diff --git a/.github/workflows/Release-DeployBattleshipZk.yml b/.github/workflows/Release-DeployBattleshipZk.yml
index 541100c7c..905ef5af5 100644
--- a/.github/workflows/Release-DeployBattleshipZk.yml
+++ b/.github/workflows/Release-DeployBattleshipZk.yml
@@ -71,10 +71,11 @@ jobs:
tags: ${{ needs.prepair.outputs.image_name }}
build-args: |
VITE_NODE_ADDRESS=${{ secrets.VITE_NODE_ADDRESS }}
- VITE_CONTRACT_ADDRESS=${{ secrets.VITE_CONTRACT_ADDRESS_BATTLE_ZK }}
+ VITE_DNS_API_URL=${{ secrets.VITE_DNS_API_URL }}
+ VITE_DNS_NAME=${{ secrets.VITE_DNS_NAME_BATTLE_ZK }}
VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN_BATTLE }}
VITE_GASLESS_BACKEND_ADDRESS=${{ secrets.VITE_GASLESS_BACKEND_ADDRESS }}
- VITE_GTM_ID=${{ secrets.VITE_GTM_ID_BATTLESHIP }}
+ VITE_GTM_ID=${{ secrets.VITE_GTM_ID_BATTLESHIP_ZK }}
VITE_ZK_PROOF_BACKEND_ADDRESS=${{ secrets.VITE_ZK_PROOF_BACKEND_ADDRESS_BATTLE }}
deploy-to-k8s:
diff --git a/.github/workflows/Release-warriors-battle.yml b/.github/workflows/Release-warriors-battle.yml
new file mode 100644
index 000000000..0c54752b7
--- /dev/null
+++ b/.github/workflows/Release-warriors-battle.yml
@@ -0,0 +1,112 @@
+name: Release - Deploy New Tamagotchi/Warriors Battle
+
+on:
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+env:
+ ENVIRONMENT: prod
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ AWS_REGION: ${{ secrets.AWS_REGION }}
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+ KUBECTL_VERSION: "v1.22.17"
+ KUBE_NAMESPACE: gear-dapps
+ KUBE_DEPLOYMENT_PREFIX: tamagotchi-battle-new
+ REGISTRY: ghcr.io/${{ github.repository }}
+
+jobs:
+ prepair:
+ runs-on: ubuntu-latest
+ outputs:
+ image_name: ${{ steps.image.outputs.image_name }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Get branch
+ id: branch
+ run: |
+ branch_name=${GITHUB_REF#refs/heads/}
+ echo "branch_name=$branch_name" >> $GITHUB_ENV
+
+ - name: Get short SHA
+ id: sha
+ run: |
+ sha_short=$(git rev-parse --short HEAD)
+ echo "sha_short=$sha_short" >> $GITHUB_ENV
+
+ - name: Set IMAGE_NAME
+ id: image
+ run: |
+ image_name=${{ env.REGISTRY }}-${{ env.KUBE_DEPLOYMENT_PREFIX }}:${{ env.branch_name }}-${{ env.sha_short }}
+ echo "image_name=$image_name" >> $GITHUB_OUTPUT
+
+ build-and-push-image:
+ needs: [prepair]
+ runs-on: ubuntu-latest
+ environment: prod
+ permissions:
+ contents: read
+ packages: write
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Log in to the github container registry
+ uses: docker/login-action@v3
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Build and push image
+ uses: docker/build-push-action@v5
+ with:
+ file: frontend/apps/web3-warriors-battle/Dockerfile
+ push: true
+ tags: ${{ needs.prepair.outputs.image_name }}
+ build-args: |
+ VITE_DNS_API_URL=${{ secrets.VITE_DNS_API_URL_TESTNET }}
+ VITE_NODE_ADDRESS=${{ secrets.VITE_NODE_ADDRESS_TESTNET }}
+ VITE_DNS_NAME=${{ secrets.VITE_DNS_NAME_BATTLE_NEW }}
+ VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }}
+ VITE_GTM_ID=${{ secrets.VITE_GTM_ID_BATTLE_NEW }}
+
+ deploy-to-k8s:
+ needs: [prepair, build-and-push-image]
+ runs-on: ubuntu-latest
+ environment: prod
+ steps:
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@v4
+ with:
+ aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
+ aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
+ aws-region: ${{ env.AWS_REGION }}
+
+ - name: Update deployment image
+ uses: kodermax/kubectl-aws-eks@main
+ with:
+ args: |
+ set image deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \
+ ${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }}=${{ needs.prepair.outputs.image_name }} \
+ -n ${{ env.KUBE_NAMESPACE }}
+
+ - name: Restart deployment
+ uses: kodermax/kubectl-aws-eks@main
+ with:
+ args: |
+ rollout restart deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \
+ -n ${{ env.KUBE_NAMESPACE }}
+
+ - name: Check deployment
+ uses: kodermax/kubectl-aws-eks@main
+ with:
+ args: |
+ rollout status deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \
+ --timeout=240s \
+ -n ${{ env.KUBE_NAMESPACE }}
diff --git a/.github/workflows/STG-DeployBattleshipZk.yml b/.github/workflows/STG-DeployBattleshipZk.yml
index 07ec7f802..d8597b7d5 100644
--- a/.github/workflows/STG-DeployBattleshipZk.yml
+++ b/.github/workflows/STG-DeployBattleshipZk.yml
@@ -76,7 +76,8 @@ jobs:
tags: ${{ needs.prepair.outputs.image_name }}
build-args: |
VITE_NODE_ADDRESS=${{ secrets.VITE_NODE_ADDRESS }}
- VITE_CONTRACT_ADDRESS=${{ secrets.VITE_CONTRACT_ADDRESS_BATTLE_ZK }}
+ VITE_DNS_API_URL=${{ secrets.VITE_DNS_API_URL }}
+ VITE_DNS_NAME=${{ secrets.VITE_DNS_NAME_BATTLE_ZK }}
VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN_BATTLE }}
VITE_GASLESS_BACKEND_ADDRESS=${{ secrets.VITE_GASLESS_BACKEND_ADDRESS }}
VITE_ZK_PROOF_BACKEND_ADDRESS=${{ secrets.VITE_ZK_PROOF_BACKEND_ADDRESS_BATTLE }}
diff --git a/.github/workflows/STG-tamagotchi-battle-new.yml b/.github/workflows/STG-tamagotchi-battle-new.yml
new file mode 100644
index 000000000..3fa1ee256
--- /dev/null
+++ b/.github/workflows/STG-tamagotchi-battle-new.yml
@@ -0,0 +1,117 @@
+name: Staging - Deploy New Tamagotchi Battle
+
+on:
+ workflow_dispatch:
+ push:
+ branches: ["master", "main"]
+ paths:
+ - frontend/apps/web3-warriors-battle/**
+ - frontend/packages/**
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+env:
+ ENVIRONMENT: stg
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ AWS_REGION: ${{ secrets.AWS_REGION }}
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+ KUBECTL_VERSION: "v1.22.17"
+ KUBE_NAMESPACE: gear-dapps
+ KUBE_DEPLOYMENT_PREFIX: tamagotchi-battle-new
+ REGISTRY: ghcr.io/${{ github.repository }}
+
+jobs:
+ prepair:
+ runs-on: ubuntu-latest
+ outputs:
+ image_name: ${{ steps.image.outputs.image_name }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Get branch
+ id: branch
+ run: |
+ branch_name=${GITHUB_REF#refs/heads/}
+ echo "branch_name=$branch_name" >> $GITHUB_ENV
+
+ - name: Get short SHA
+ id: sha
+ run: |
+ sha_short=$(git rev-parse --short HEAD)
+ echo "sha_short=$sha_short" >> $GITHUB_ENV
+
+ - name: Set IMAGE_NAME
+ id: image
+ run: |
+ image_name=${{ env.REGISTRY }}-${{ env.KUBE_DEPLOYMENT_PREFIX }}:${{ env.branch_name }}-${{ env.sha_short }}
+ echo "image_name=$image_name" >> $GITHUB_OUTPUT
+
+ build-and-push-image:
+ needs: [prepair]
+ runs-on: ubuntu-latest
+ environment: stg
+ permissions:
+ contents: read
+ packages: write
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Log in to the github container registry
+ uses: docker/login-action@v3
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Build and push image
+ uses: docker/build-push-action@v5
+ with:
+ file: frontend/apps/web3-warriors-battle/Dockerfile
+ push: true
+ tags: ${{ needs.prepair.outputs.image_name }}
+ build-args: |
+ VITE_DNS_API_URL=${{ secrets.VITE_DNS_API_URL }}
+ VITE_NODE_ADDRESS=${{ secrets.VITE_NODE_ADDRESS }}
+ VITE_DNS_NAME=${{ secrets.VITE_DNS_NAME_BATTLE_NEW }}
+ VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }}
+ VITE_GASLESS_BACKEND_ADDRESS=${{ secrets.VITE_GASLESS_BACKEND_ADDRESS }}
+
+ deploy-to-k8s:
+ needs: [prepair, build-and-push-image]
+ runs-on: ubuntu-latest
+ environment: stg
+ steps:
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@v4
+ with:
+ aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
+ aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
+ aws-region: ${{ env.AWS_REGION }}
+
+ - name: Update deployment image
+ uses: kodermax/kubectl-aws-eks@main
+ with:
+ args: |
+ set image deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \
+ ${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }}=${{ needs.prepair.outputs.image_name }} \
+ -n ${{ env.KUBE_NAMESPACE }}
+
+ - name: Restart deployment
+ uses: kodermax/kubectl-aws-eks@main
+ with:
+ args: |
+ rollout restart deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \
+ -n ${{ env.KUBE_NAMESPACE }}
+
+ - name: Check deployment
+ uses: kodermax/kubectl-aws-eks@main
+ with:
+ args: |
+ rollout status deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \
+ --timeout=240s \
+ -n ${{ env.KUBE_NAMESPACE }}
diff --git a/.github/workflows/UpdateGearDependency.yml b/.github/workflows/UpdateGearDependency.yml
index edb88be7f..41d2be4bd 100644
--- a/.github/workflows/UpdateGearDependency.yml
+++ b/.github/workflows/UpdateGearDependency.yml
@@ -2,43 +2,89 @@ name: Update GEAR Dependencies
on:
schedule:
- - cron: '0 0 * * *' # Runs every day at midnight
+ - cron: '0 */2 * * *' # Runs every 30 minutes
workflow_dispatch: # Allows manual triggering of the workflow
defaults:
run:
working-directory: scripts
+permissions:
+ contents: write
+ actions: write
+ pull-requests: write
+
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- token: ${{ secrets.UPDATE_GEAR_TAG_TOKEN }}
+ token: ${{ secrets.WF_SECRET }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- - name: Install GitPython
+ - name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests packaging gitpython
- name: Check for new tag and update Cargo.toml
env:
- GITHUB_TOKEN: ${{ secrets.UPDATE_GEAR_TAG_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.WF_SECRET }}
run: |
python update_gear_version.py
if ! git diff --exit-code; then
+ echo "Changes detected in the repository after running the update_gear_version.py script."
+
+ # Configure git
git config user.name "github-actions[bot]"
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- git add ../contracts/Cargo.toml
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+
+ # Output changes for logging
+ echo "The following changes were made:"
+ git diff
+
+ # Create a new branch
+ branch_name="update-gear-dependencies-$(date +%Y%m%d%H%M%S)"
+ echo "Creating a new branch: $branch_name"
+ git checkout -b $branch_name
+
+ # Remove and update Cargo.lock file
+ echo "Removing contracts/Cargo.lock"
+ rm -f ../contracts/Cargo.lock
+ echo "Updating contracts/Cargo.lock"
+ cd ../contracts && cargo generate-lockfile
+
+ # Stage and commit changes
+ echo "Staging changed files."
+ git add Cargo.toml
+ git add ../.github/workflows/contracts-tests.yml
+ git add Cargo.lock
+
+ echo "Committing changes with message: 'Update GEAR dependencies to latest tag in contracts'"
git commit -m "Update GEAR dependencies to latest tag in contracts"
- git push origin master -f
+
+ # Check if there's an open PR with the label 'auto-update-gear'
+ open_prs=$(gh pr list --label "auto-update-gear" --state open --json number --jq '.[].number')
+
+ if [ -n "$open_prs" ]; then
+ echo "An open pull request with the label 'auto-update-gear' already exists. Exiting."
+ exit 0
+ fi
+
+ # If no matching PR was found, push the branch and create a new PR
+ echo "Pushing the new branch: $branch_name"
+ git push origin $branch_name
+
+ echo "Creating a new pull request."
+ gh pr create --title "Update GEAR dependencies" --body "Automatically created pull request to update GEAR dependencies" --base master --head $branch_name --label "auto-update-gear"
+ else
+ echo "No changes were detected after running the update_gear_version.py script."
fi
diff --git a/.github/workflows/contracts-tests.yml b/.github/workflows/contracts-tests.yml
index be3fcf14b..d1a8a96cb 100644
--- a/.github/workflows/contracts-tests.yml
+++ b/.github/workflows/contracts-tests.yml
@@ -1,20 +1,19 @@
name: Contracts CI - Tests
on:
- workflow_dispatch:
pull_request:
- paths-ignore:
- - 'contracts/**'
- - 'docker/**'
+ branches: [master, main]
+ paths:
+ - contracts/**
push:
- paths-ignore:
- - 'contracts/**'
- - 'docker/**'
- branches: [master]
+ branches: [master, main]
+ paths:
+ - contracts/**
+ workflow_dispatch:
env:
CARGO_TERM_COLOR: always
- GEAR_VERSION: 1.4.2
+ GEAR_VERSION: 1.7.0
defaults:
run:
@@ -39,32 +38,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- - name: Set up Rust
+ - name: Set up Rust (Stable)
uses: dtolnay/rust-toolchain@stable
with:
- toolchain: nightly
+ toolchain: stable
targets: wasm32-unknown-unknown
- components: clippy, rustfmt
+
+ - name: Install rust-src component
+ run: rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
- name: Prepare Gear Binary
run: |
mkdir -p target/tmp
wget -qO- https://get.gear.rs/gear-v${{ env.GEAR_VERSION }}-x86_64-unknown-linux-gnu.tar.xz| tar xJ -C target/tmp
-
# mandatory tasks
- name: Fmt
run: 'cargo +nightly fmt --all -- --config imports_granularity=Crate,edition=2021'
- name: Clippy
run: 'cargo clippy --release --workspace --all-targets --all-features -- -D warnings'
-
- # Only on push to master
- - name: On Push to master
- if: github.ref != 'refs/heads/master'
- run: |
- cargo test --release --workspace
- cargo test --workspace
-
- # Only on push to PR
- - name: On Push to Pull Request
- if: github.ref != 'refs/heads/master'
- run: cargo test --release --workspace
\ No newline at end of file
+ - name: Test
+ run: cargo test --release --workspace
diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml
index d338520eb..3525807a5 100644
--- a/.github/workflows/contracts.yml
+++ b/.github/workflows/contracts.yml
@@ -5,7 +5,7 @@ on:
env:
CARGO_TERM_COLOR: always
- DEFAULT_TOOLCHAIN: 1.78.0
+ DEFAULT_TOOLCHAIN: 1.82.0
defaults:
run:
@@ -30,6 +30,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
+ - name: Install rust-src component
+ run: rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
+
- name: Build
run: 'cargo build --release --workspace;'
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..4e52b6ca3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+# misc
+.DS_Store
diff --git a/backend/gasless/.env.example b/backend/gasless/.env.example
new file mode 100644
index 000000000..ed51c748e
--- /dev/null
+++ b/backend/gasless/.env.example
@@ -0,0 +1,2 @@
+NODE_URL=wss://rpc.vara-network.io
+VOUCHER_ACCOUNT=0x...
\ No newline at end of file
diff --git a/backend/gasless/.eslintrc.json b/backend/gasless/.eslintrc.json
new file mode 100644
index 000000000..581328718
--- /dev/null
+++ b/backend/gasless/.eslintrc.json
@@ -0,0 +1,39 @@
+{
+ "root": true,
+ "env": {
+ "browser": true,
+ "es2021": true,
+ "node": true
+ },
+ "extends": ["airbnb-typescript/base", "plugin:@typescript-eslint/recommended"],
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "ecmaVersion": "latest",
+ "sourceType": "module"
+ },
+ "plugins": ["@typescript-eslint"],
+ "rules": {
+ "semi": ["error", "always"],
+ "object-curly-spacing": ["error", "always"],
+ "indent": [
+ "warn",
+ 2,
+ {
+ "SwitchCase": 1,
+ "flatTernaryExpressions": false,
+ "offsetTernaryExpressions": true
+ }
+ ],
+ "linebreak-style": ["error", "unix"],
+ "quotes": ["warn", "single", { "avoidEscape": true }],
+ "@typescript-eslint/no-empty-function": 0,
+ "@typescript-eslint/no-explicit-any": "off",
+ "no-case-declarations": 0,
+ "eol-last": "error",
+ "max-len": ["error", { "code": 120, "tabWidth": 2, "ignoreStrings": true, "ignoreComments": true }],
+ "array-bracket-spacing": ["error", "always"],
+ "computed-property-spacing": ["error", "never"],
+ "no-multi-spaces": "error",
+ "space-before-function-paren": ["error", "never"]
+ }
+}
diff --git a/backend/gasless/.gitignore b/backend/gasless/.gitignore
new file mode 100644
index 000000000..aa36073f1
--- /dev/null
+++ b/backend/gasless/.gitignore
@@ -0,0 +1,12 @@
+.DS_Store
+.vscode/
+.binpath
+.metahash
+
+# Rust
+target/
+
+# Npm
+node_modules/
+.env
+dist/
diff --git a/backend/gasless/README.md b/backend/gasless/README.md
new file mode 100644
index 000000000..1c5008694
--- /dev/null
+++ b/backend/gasless/README.md
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+# Gasless
+
+## Description
+
+Example of backend for issuing and revoking vouchers (gasless).
+
+Example contains three functions for issuing and revoking vouchers:
+
+1. `issue(account: HexString, programId: HexString, amount: number, durationInSec: number): Promise`
+ - Issues a voucher for the given account, programId, amount, and duration.
+ - Parameters:
+ - `account`: The account to issue the voucher for.
+ - `programId`: The programId to issue the voucher for.
+ - `amount`: The amount to issue the voucher for.
+ - `durationInSec`: The duration to issue the voucher for in seconds.
+ - Returns: A Promise that resolves to the voucherId as a string.
+
+2. `prolong(voucherId: HexString, account: string, balance: number, prolongDurationInSec: number): Promise`
+ - Prolongs the voucher with the given voucherId, account, balance, and prolongDuration.
+ - Parameters:
+ - `voucherId`: The voucherId to prolong.
+ - `account`: The account to prolong the voucher for.
+ - `balance`: The required balance to top up the voucher.
+ - `prolongDurationInSec`: The duration to prolong the voucher for in seconds.
+ - Returns: A Promise that resolves when the operation is complete.
+
+3. `revoke(voucherId: HexString, account: string): Promise`
+ - Revokes the voucher with the given voucherId and account.
+ - Parameters:
+ - `voucherId`: The voucherId to revoke.
+ - `account`: The account to revoke the voucher for.
+ - Returns: A Promise that resolves when the operation is complete.
+
+These functions are part of the `GaslessService` class, which interacts with the Gear API to manage vouchers.
+
+Example of using the `GaslessService` class is provided in the `index.ts` file.
+
+```POST /issue```
+
+```POST /prolong```
+
+```POST /revoke```
+
+
+## Getting started
+
+### Install packages:
+
+```sh
+yarn install
+```
+
+### Declare environment variables:
+
+Create `.env` file, `.env.example` will let you know what variables are expected.
+
+
+### Build the app:
+
+```sh
+yarn build
+```
+
+### Run the app:
+
+```sh
+yarn start
+```
diff --git a/backend/gasless/package.json b/backend/gasless/package.json
new file mode 100644
index 000000000..5694e279c
--- /dev/null
+++ b/backend/gasless/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "gasless",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "build": "rm -rf dist && tsc",
+ "start": "node dist/index.js",
+ "watch": "ts-node-dev src/index.ts"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "@gear-js/api": "^0.36.3",
+ "@polkadot/api": "^10.11.2",
+ "@polkadot/types": "10.10.1",
+ "@polkadot/wasm-crypto": "^7.3.2",
+ "@polkadot/util": "^7.3.2",
+ "dotenv": "^16.0.3",
+ "express": "^4.18.2"
+ },
+ "devDependencies": {
+ "@types/express": "^4.17.17",
+ "@types/node": "^20.10.0",
+ "ts-node-dev": "^2.0.0",
+ "types": "*",
+ "typescript": "^5.0.4"
+ }
+}
diff --git a/backend/gasless/src/gasless-service.ts b/backend/gasless/src/gasless-service.ts
new file mode 100644
index 000000000..694919eeb
--- /dev/null
+++ b/backend/gasless/src/gasless-service.ts
@@ -0,0 +1,143 @@
+import { GearApi, HexString, VoucherIssuedData, IUpdateVoucherParams } from '@gear-js/api';
+import { waitReady } from '@polkadot/wasm-crypto';
+import { hexToU8a, } from '@polkadot/util';
+
+import { Keyring } from '@polkadot/api';
+
+const secondsToBlock = 3;
+
+export class GaslessService {
+ private api: GearApi;
+ private readonly voucherAccount;
+
+ constructor() {
+ this.api = new GearApi({ providerAddress: process.env.NODE_URL });
+ this.voucherAccount = this.getVoucherAccount();
+ }
+
+ /**
+ * Issues a voucher for the given account, programId, amount, and duration.
+ *
+ * @param account - The account to issue the voucher for.
+ * @param programId - The programId to issue the voucher for.
+ * @param amount - The amount to issue the voucher for.
+ * @param durationInSec - The duration to issue the voucher for.
+ * @returns The voucherId.
+ */
+ async issue(account: HexString, programId: HexString, amount: number, durationInSec: number): Promise {
+ await Promise.all([this.api.isReadyOrError, waitReady()])
+
+ const durationInBlocks = Math.round(durationInSec / secondsToBlock);
+
+ const { extrinsic } = await this.api.voucher.issue(account, amount * 1e12, durationInBlocks, [programId]);
+
+ const voucherId = await new Promise((resolve, reject) => {
+ extrinsic.signAndSend(this.voucherAccount, ({
+ events,
+ status,
+ }) => {
+ if (status.isInBlock) {
+ const viEvent = events.find(({ event }) => event.method === 'VoucherIssued');
+ if (viEvent) {
+ const data = viEvent.event.data as VoucherIssuedData;
+ resolve(data.voucherId.toHex());
+ } else {
+ const efEvent = events.find(({ event }) => event.method === 'ExtrinsicFailed');
+
+ reject(efEvent ? this.api.getExtrinsicFailedError(efEvent?.event) : 'VoucherIssued event not found');
+ }
+ }
+ });
+ });
+
+ return voucherId;
+ }
+
+ /**
+ * Prolongs the voucher with the given voucherId, account, balance, and prolongDurationInSec.
+ *
+ * @param voucherId - The voucherId to prolong
+ * @param account - The account to prolong the voucher for
+ * @param balance - The required balance to top up the voucher
+ * @param prolongDurationInSec - The duration to prolong the voucher for
+ */
+ async prolong(voucherId: HexString, account: string, balance: number, prolongDurationInSec: number) {
+ const voucherBalance = (await this.api.balance.findOut(voucherId)).toBigInt() / BigInt(1e12);
+ const durationInBlocks = Math.round(prolongDurationInSec / secondsToBlock);
+
+ const topUp = BigInt(balance) - voucherBalance;
+
+ const params: IUpdateVoucherParams = {};
+
+ if (prolongDurationInSec) {
+ params.prolongDuration = durationInBlocks;
+ }
+
+ if (topUp > 0) {
+ params.balanceTopUp = topUp * BigInt(1e12);
+ }
+
+ const tx = this.api.voucher.update(account, voucherId, params);
+
+ await new Promise((resolve, reject) => {
+ tx.signAndSend(this.voucherAccount, ({
+ events,
+ status,
+ }) => {
+ if (status.isInBlock) {
+ const vuEvent = events.find(({ event }) => event.method === 'VoucherUpdated');
+ if (vuEvent) {
+ resolve();
+ } else {
+ const efEvent = events.find(({ event }) => event.method === 'ExtrinsicFailed');
+ if (efEvent) {
+ reject(JSON.stringify(this.api.getExtrinsicFailedError(efEvent?.event)));
+ } else {
+ reject(new Error('VoucherUpdated event not found'));
+ }
+ }
+ }
+ });
+ });
+ }
+
+ /**
+ * Revokes the voucher with the given voucherId and account.
+ *
+ * @param voucherId - The voucherId to revoke
+ * @param account - The account to revoke the voucher for
+ */
+ async revoke(voucherId: HexString, account: string) {
+ const tx = this.api.voucher.revoke(account, voucherId);
+ await new Promise((resolve, reject) => {
+ tx.signAndSend(this.voucherAccount, ({
+ events,
+ status,
+ }) => {
+ if (status.isInBlock) {
+ const vuEvent = events.find(({ event }) => event.method === 'VoucherRevoked');
+ if (vuEvent) {
+ resolve();
+ } else {
+ const efEvent = events.find(({ event }) => event.method === 'ExtrinsicFailed');
+ if (efEvent) {
+ reject(JSON.stringify(this.api.getExtrinsicFailedError(efEvent?.event)));
+ } else {
+ reject(new Error('VoucherRevoked event not found'));
+ }
+ }
+ }
+ });
+ });
+ }
+
+ private getVoucherAccount() {
+ const seed = process.env.VOUCHER_ACCOUNT;
+ const keyring = new Keyring({
+ type: 'sr25519',
+ ss58Format: 137,
+ });
+ const voucherAccount = keyring.addFromSeed(hexToU8a(seed));
+ return voucherAccount;
+ }
+}
diff --git a/backend/gasless/src/index.ts b/backend/gasless/src/index.ts
new file mode 100644
index 000000000..ddb049540
--- /dev/null
+++ b/backend/gasless/src/index.ts
@@ -0,0 +1,37 @@
+import express from 'express';
+import bodyParser from 'body-parser';
+import { GaslessService } from './gasless-service';
+import dotenv from 'dotenv';
+
+export { GaslessService };
+
+dotenv.config();
+
+const app = express();
+const gaslessService = new GaslessService();
+
+app.use(bodyParser.json());
+
+app.post('/issue', async function (req, res) {
+ const data = req.body;
+ const voucher = await gaslessService.issue(data.account, data.programId, data.amount, data.durationInSec);
+ res.send(voucher);
+});
+
+
+app.post('/prolong', async function (req, res) {
+ const data = req.body;
+ await gaslessService.prolong(data.voucherId, data.account, data.balance, data.durationInSec);
+ res.status(200);
+});
+
+app.post('/revoke', async function (req, res) {
+ const data = req.body;
+ await gaslessService.revoke(data.voucherId, data.account);
+ res.status(200);
+});
+
+const port = process.env.PORT || 3000;
+app.listen(port, () => {
+ console.log(`Server is running on port ${port}`);
+});
diff --git a/backend/gasless/tsconfig.json b/backend/gasless/tsconfig.json
new file mode 100644
index 000000000..cf658a45e
--- /dev/null
+++ b/backend/gasless/tsconfig.json
@@ -0,0 +1,101 @@
+{
+ "compilerOptions": {
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
+
+ /* Projects */
+ // "incremental": true, /* Enable incremental compilation */
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
+ // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
+
+ /* Language and Environment */
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
+ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
+ // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
+
+ /* Modules */
+ "module": "commonjs", /* Specify what module code is generated. */
+ // "rootDir": "./", /* Specify the root folder within your source files. */
+ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
+ // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
+ // "resolveJsonModule": true, /* Enable importing .json files */
+ // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */
+
+ /* JavaScript Support */
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
+
+ /* Emit */
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
+ "outDir": "./dist", /* Specify an output folder for all emitted files. */
+ // "removeComments": true, /* Disable emitting comments. */
+ // "noEmit": true, /* Disable emitting files from a compilation. */
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
+ // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
+ // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
+
+ /* Interop Constraints */
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
+
+ /* Type Checking */
+ "strict": true, /* Enable all strict type-checking options. */
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
+ // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
+ // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
+ // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
+ // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
+ // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
+ // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
+
+ /* Completeness */
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
+ }
+}
diff --git a/backend/gasless/yarn.lock b/backend/gasless/yarn.lock
new file mode 100644
index 000000000..c374df28d
--- /dev/null
+++ b/backend/gasless/yarn.lock
@@ -0,0 +1,1768 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@babel/runtime@^7.16.3":
+ version "7.25.6"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2"
+ integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==
+ dependencies:
+ regenerator-runtime "^0.14.0"
+
+"@cspotcode/source-map-support@^0.8.0":
+ version "0.8.1"
+ resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz"
+ integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==
+ dependencies:
+ "@jridgewell/trace-mapping" "0.3.9"
+
+"@gear-js/api@^0.36.3":
+ version "0.36.7"
+ resolved "https://registry.yarnpkg.com/@gear-js/api/-/api-0.36.7.tgz#23e484f636a06906865d7e4ffca8e68c9c9014fa"
+ integrity sha512-o0AxTAKJtoyh+Ii60CKuT0Q5wSKUeEiZXs/4nRJmeHxI+e/BTp6J+To790DunZSc3r3zA0G59Vc5tCagyVnWDQ==
+
+"@jridgewell/resolve-uri@^3.0.3":
+ version "3.1.1"
+ resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz"
+ integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==
+
+"@jridgewell/sourcemap-codec@^1.4.10":
+ version "1.4.15"
+ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz"
+ integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
+
+"@jridgewell/trace-mapping@0.3.9":
+ version "0.3.9"
+ resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz"
+ integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==
+ dependencies:
+ "@jridgewell/resolve-uri" "^3.0.3"
+ "@jridgewell/sourcemap-codec" "^1.4.10"
+
+"@noble/curves@^1.2.0":
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz"
+ integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==
+ dependencies:
+ "@noble/hashes" "1.3.2"
+
+"@noble/curves@^1.3.0":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b"
+ integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==
+ dependencies:
+ "@noble/hashes" "1.5.0"
+
+"@noble/hashes@1.3.2", "@noble/hashes@^1.3.2":
+ version "1.3.2"
+ resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz"
+ integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==
+
+"@noble/hashes@1.5.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.3.3":
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0"
+ integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==
+
+"@polkadot-api/client@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0":
+ version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ resolved "https://registry.yarnpkg.com/@polkadot-api/client/-/client-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#5d6b863f63f5c6ecd4183fcf0c5c84dd349f7627"
+ integrity sha512-0fqK6pUKcGHSG2pBvY+gfSS+1mMdjd/qRygAcKI5d05tKsnZLRnmhb9laDguKmGEIB0Bz9vQqNK3gIN/cfvVwg==
+ dependencies:
+ "@polkadot-api/metadata-builders" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@polkadot-api/substrate-bindings" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@polkadot-api/substrate-client" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@polkadot-api/utils" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+
+"@polkadot-api/json-rpc-provider-proxy@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0":
+ version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#cc28fb801db6a47824261a709ab924ec6951eb96"
+ integrity sha512-0hZ8vtjcsyCX8AyqP2sqUHa1TFFfxGWmlXJkit0Nqp9b32MwZqn5eaUAiV2rNuEpoglKOdKnkGtUF8t5MoodKw==
+
+"@polkadot-api/json-rpc-provider@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0":
+ version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#2f71bfb192d28dd4c400ef8b1c5f934c676950f3"
+ integrity sha512-EaUS9Fc3wsiUr6ZS43PQqaRScW7kM6DYbuM/ou0aYjm8N9MBqgDbGm2oL6RE1vAVmOfEuHcXZuZkhzWtyvQUtA==
+
+"@polkadot-api/metadata-builders@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0":
+ version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ resolved "https://registry.yarnpkg.com/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#085db2a3c7b100626b2fae3be35a32a24ea7714f"
+ integrity sha512-BD7rruxChL1VXt0icC2gD45OtT9ofJlql0qIllHSRYgama1CR2Owt+ApInQxB+lWqM+xNOznZRpj8CXNDvKIMg==
+ dependencies:
+ "@polkadot-api/substrate-bindings" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@polkadot-api/utils" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+
+"@polkadot-api/substrate-bindings@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0":
+ version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#f836a554a9ead6fb6356079c725cd53f87238932"
+ integrity sha512-N4vdrZopbsw8k57uG58ofO7nLXM4Ai7835XqakN27MkjXMp5H830A1KJE0L9sGQR7ukOCDEIHHcwXVrzmJ/PBg==
+ dependencies:
+ "@noble/hashes" "^1.3.1"
+ "@polkadot-api/utils" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@scure/base" "^1.1.1"
+ scale-ts "^1.6.0"
+
+"@polkadot-api/substrate-client@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0":
+ version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-client/-/substrate-client-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#55ae463f4143495e328465dd16b03e71663ef4c4"
+ integrity sha512-lcdvd2ssUmB1CPzF8s2dnNOqbrDa+nxaaGbuts+Vo8yjgSKwds2Lo7Oq+imZN4VKW7t9+uaVcKFLMF7PdH0RWw==
+
+"@polkadot-api/utils@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0":
+ version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ resolved "https://registry.yarnpkg.com/@polkadot-api/utils/-/utils-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#759698dcf948745ea37cc5ab6abd49a00f1b0c31"
+ integrity sha512-0CYaCjfLQJTCRCiYvZ81OncHXEKPzAexCMoVloR+v2nl/O2JRya/361MtPkeNLC6XBoaEgLAG9pWQpH3WePzsw==
+
+"@polkadot/api-augment@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-10.13.1.tgz#dd3670a2f1a581c38b857ad3b0805b6581099c63"
+ integrity sha512-IAKaCp19QxgOG4HKk9RAgUgC/VNVqymZ2GXfMNOZWImZhxRIbrK+raH5vN2MbWwtVHpjxyXvGsd1RRhnohI33A==
+ dependencies:
+ "@polkadot/api-base" "10.13.1"
+ "@polkadot/rpc-augment" "10.13.1"
+ "@polkadot/types" "10.13.1"
+ "@polkadot/types-augment" "10.13.1"
+ "@polkadot/types-codec" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/api-base@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-10.13.1.tgz#efed5bb31e38244b6a68ce56138b97ad82101426"
+ integrity sha512-Okrw5hjtEjqSMOG08J6qqEwlUQujTVClvY1/eZkzKwNzPelWrtV6vqfyJklB7zVhenlxfxqhZKKcY7zWSW/q5Q==
+ dependencies:
+ "@polkadot/rpc-core" "10.13.1"
+ "@polkadot/types" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ rxjs "^7.8.1"
+ tslib "^2.6.2"
+
+"@polkadot/api-derive@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-10.13.1.tgz#d8827ee83124f3b3f664c415cdde9c6b909e5145"
+ integrity sha512-ef0H0GeCZ4q5Om+c61eLLLL29UxFC2/u/k8V1K2JOIU+2wD5LF7sjAoV09CBMKKHfkLenRckVk2ukm4rBqFRpg==
+ dependencies:
+ "@polkadot/api" "10.13.1"
+ "@polkadot/api-augment" "10.13.1"
+ "@polkadot/api-base" "10.13.1"
+ "@polkadot/rpc-core" "10.13.1"
+ "@polkadot/types" "10.13.1"
+ "@polkadot/types-codec" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ "@polkadot/util-crypto" "^12.6.2"
+ rxjs "^7.8.1"
+ tslib "^2.6.2"
+
+"@polkadot/api@10.13.1", "@polkadot/api@^10.11.2":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-10.13.1.tgz#47586c070d3fe13a0acc93a8aa9c3a53791284fb"
+ integrity sha512-YrKWR4TQR5CDyGkF0mloEUo7OsUA+bdtENpJGOtNavzOQUDEbxFE0PVzokzZfVfHhHX2CojPVmtzmmLxztyJkg==
+ dependencies:
+ "@polkadot/api-augment" "10.13.1"
+ "@polkadot/api-base" "10.13.1"
+ "@polkadot/api-derive" "10.13.1"
+ "@polkadot/keyring" "^12.6.2"
+ "@polkadot/rpc-augment" "10.13.1"
+ "@polkadot/rpc-core" "10.13.1"
+ "@polkadot/rpc-provider" "10.13.1"
+ "@polkadot/types" "10.13.1"
+ "@polkadot/types-augment" "10.13.1"
+ "@polkadot/types-codec" "10.13.1"
+ "@polkadot/types-create" "10.13.1"
+ "@polkadot/types-known" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ "@polkadot/util-crypto" "^12.6.2"
+ eventemitter3 "^5.0.1"
+ rxjs "^7.8.1"
+ tslib "^2.6.2"
+
+"@polkadot/keyring@^12.5.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/keyring/-/keyring-12.6.1.tgz"
+ integrity sha512-cicTctZr5Jy5vgNT2FsNiKoTZnz6zQkgDoIYv79NI+p1Fhwc9C+DN/iMCnk3Cm9vR2gSAd2fSV+Y5iKVDhAmUw==
+ dependencies:
+ "@polkadot/util" "12.6.1"
+ "@polkadot/util-crypto" "12.6.1"
+ tslib "^2.6.2"
+
+"@polkadot/keyring@^12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-12.6.2.tgz#6067e6294fee23728b008ac116e7e9db05cecb9b"
+ integrity sha512-O3Q7GVmRYm8q7HuB3S0+Yf/q/EB2egKRRU3fv9b3B7V+A52tKzA+vIwEmNVaD1g5FKW9oB97rmpggs0zaKFqHw==
+ dependencies:
+ "@polkadot/util" "12.6.2"
+ "@polkadot/util-crypto" "12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/networks@12.6.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/networks/-/networks-12.6.1.tgz"
+ integrity sha512-pzyirxTYAnsx+6kyLYcUk26e4TLz3cX6p2KhTgAVW77YnpGX5VTKTbYykyXC8fXFd/migeQsLaa2raFN47mwoA==
+ dependencies:
+ "@polkadot/util" "12.6.1"
+ "@substrate/ss58-registry" "^1.44.0"
+ tslib "^2.6.2"
+
+"@polkadot/networks@12.6.2", "@polkadot/networks@^12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.6.2.tgz#791779fee1d86cc5b6cd371858eea9b7c3f8720d"
+ integrity sha512-1oWtZm1IvPWqvMrldVH6NI2gBoCndl5GEwx7lAuQWGr7eNL+6Bdc5K3Z9T0MzFvDGoi2/CBqjX9dRKo39pDC/w==
+ dependencies:
+ "@polkadot/util" "12.6.2"
+ "@substrate/ss58-registry" "^1.44.0"
+ tslib "^2.6.2"
+
+"@polkadot/rpc-augment@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-10.13.1.tgz#83317b46c5ab86104cca2bdc336199db0c25b798"
+ integrity sha512-iLsWUW4Jcx3DOdVrSHtN0biwxlHuTs4QN2hjJV0gd0jo7W08SXhWabZIf9mDmvUJIbR7Vk+9amzvegjRyIf5+A==
+ dependencies:
+ "@polkadot/rpc-core" "10.13.1"
+ "@polkadot/types" "10.13.1"
+ "@polkadot/types-codec" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/rpc-core@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-10.13.1.tgz#a7ea9db8997b68aa6724f28ba76125a73e925575"
+ integrity sha512-eoejSHa+/tzHm0vwic62/aptTGbph8vaBpbvLIK7gd00+rT813ROz5ckB1CqQBFB23nHRLuzzX/toY8ID3xrKw==
+ dependencies:
+ "@polkadot/rpc-augment" "10.13.1"
+ "@polkadot/rpc-provider" "10.13.1"
+ "@polkadot/types" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ rxjs "^7.8.1"
+ tslib "^2.6.2"
+
+"@polkadot/rpc-provider@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-10.13.1.tgz#7e17f7be7d9a104b797d8f5aa8f1ed69f800f841"
+ integrity sha512-oJ7tatVXYJ0L7NpNiGd69D558HG5y5ZDmH2Bp9Dd4kFTQIiV8A39SlWwWUPCjSsen9lqSvvprNLnG/VHTpenbw==
+ dependencies:
+ "@polkadot/keyring" "^12.6.2"
+ "@polkadot/types" "10.13.1"
+ "@polkadot/types-support" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ "@polkadot/util-crypto" "^12.6.2"
+ "@polkadot/x-fetch" "^12.6.2"
+ "@polkadot/x-global" "^12.6.2"
+ "@polkadot/x-ws" "^12.6.2"
+ eventemitter3 "^5.0.1"
+ mock-socket "^9.3.1"
+ nock "^13.5.0"
+ tslib "^2.6.2"
+ optionalDependencies:
+ "@substrate/connect" "0.8.8"
+
+"@polkadot/types-augment@10.10.1":
+ version "10.10.1"
+ resolved "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-10.10.1.tgz"
+ integrity sha512-XRHE75IocXfFE6EADYov3pqXCyBk5SWbiHoZ0+4WYWP9SwMuzsBaAy84NlhLBlkG3+ehIqi0HpAd/qrljJGZbg==
+ dependencies:
+ "@polkadot/types" "10.10.1"
+ "@polkadot/types-codec" "10.10.1"
+ "@polkadot/util" "^12.5.1"
+ tslib "^2.6.2"
+
+"@polkadot/types-augment@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-10.13.1.tgz#8f39a46a1a3e100be03cbae06f43a043cb25c337"
+ integrity sha512-TcrLhf95FNFin61qmVgOgayzQB/RqVsSg9thAso1Fh6pX4HSbvI35aGPBAn3SkA6R+9/TmtECirpSNLtIGFn0g==
+ dependencies:
+ "@polkadot/types" "10.13.1"
+ "@polkadot/types-codec" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/types-codec@10.10.1":
+ version "10.10.1"
+ resolved "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-10.10.1.tgz"
+ integrity sha512-ETPG0wzWzt/bDKRQmYbO7CLe/0lUt8VrG6/bECdv+Kye+8Qedba2LZyTWm/9f2ngms8TZ82yI8mPv/mozdtfnw==
+ dependencies:
+ "@polkadot/util" "^12.5.1"
+ "@polkadot/x-bigint" "^12.5.1"
+ tslib "^2.6.2"
+
+"@polkadot/types-codec@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-10.13.1.tgz#f70cd617160b467685ef3ce5195a04142255ba7b"
+ integrity sha512-AiQ2Vv2lbZVxEdRCN8XSERiWlOWa2cTDLnpAId78EnCtx4HLKYQSd+Jk9Y4BgO35R79mchK4iG+w6gZ+ukG2bg==
+ dependencies:
+ "@polkadot/util" "^12.6.2"
+ "@polkadot/x-bigint" "^12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/types-create@10.10.1":
+ version "10.10.1"
+ resolved "https://registry.npmjs.org/@polkadot/types-create/-/types-create-10.10.1.tgz"
+ integrity sha512-7OiLzd+Ter5zrpjP7fDwA1m89kd38VvMVixfOSv8x7ld2pDT+yyyKl14TCwRSWrKWCMtIb6M3iasPhq5cUa7cw==
+ dependencies:
+ "@polkadot/types-codec" "10.10.1"
+ "@polkadot/util" "^12.5.1"
+ tslib "^2.6.2"
+
+"@polkadot/types-create@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-10.13.1.tgz#99470816d0d2ca32a6a5ce6d701b4199e8700f66"
+ integrity sha512-Usn1jqrz35SXgCDAqSXy7mnD6j4RvB4wyzTAZipFA6DGmhwyxxIgOzlWQWDb+1PtPKo9vtMzen5IJ+7w5chIeA==
+ dependencies:
+ "@polkadot/types-codec" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/types-known@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-10.13.1.tgz#8cca2d3f2c4ef67849f66ba4a35856063ec61f5f"
+ integrity sha512-uHjDW05EavOT5JeU8RbiFWTgPilZ+odsCcuEYIJGmK+es3lk/Qsdns9Zb7U7NJl7eJ6OWmRtyrWsLs+bU+jjIQ==
+ dependencies:
+ "@polkadot/networks" "^12.6.2"
+ "@polkadot/types" "10.13.1"
+ "@polkadot/types-codec" "10.13.1"
+ "@polkadot/types-create" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/types-support@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-10.13.1.tgz#d4b58c8d9bcbb8e897a255d9a66c217dcaa6ead4"
+ integrity sha512-4gEPfz36XRQIY7inKq0HXNVVhR6HvXtm7yrEmuBuhM86LE0lQQBkISUSgR358bdn2OFSLMxMoRNoh3kcDvdGDQ==
+ dependencies:
+ "@polkadot/util" "^12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/types@10.10.1":
+ version "10.10.1"
+ resolved "https://registry.npmjs.org/@polkadot/types/-/types-10.10.1.tgz"
+ integrity sha512-Ben62P1tjYEhKag34GBGcLX6NqcFR1VD5nNbWaxgr+t36Jl/tlHs6P9DlbFqQP7Tt9FmGrAYY0m3oTkhjG1NzA==
+ dependencies:
+ "@polkadot/keyring" "^12.5.1"
+ "@polkadot/types-augment" "10.10.1"
+ "@polkadot/types-codec" "10.10.1"
+ "@polkadot/types-create" "10.10.1"
+ "@polkadot/util" "^12.5.1"
+ "@polkadot/util-crypto" "^12.5.1"
+ rxjs "^7.8.1"
+ tslib "^2.6.2"
+
+"@polkadot/types@10.13.1":
+ version "10.13.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-10.13.1.tgz#979d652dc11af9cb8b32e7a55839e9762532755d"
+ integrity sha512-Hfvg1ZgJlYyzGSAVrDIpp3vullgxrjOlh/CSThd/PI4TTN1qHoPSFm2hs77k3mKkOzg+LrWsLE0P/LP2XddYcw==
+ dependencies:
+ "@polkadot/keyring" "^12.6.2"
+ "@polkadot/types-augment" "10.13.1"
+ "@polkadot/types-codec" "10.13.1"
+ "@polkadot/types-create" "10.13.1"
+ "@polkadot/util" "^12.6.2"
+ "@polkadot/util-crypto" "^12.6.2"
+ rxjs "^7.8.1"
+ tslib "^2.6.2"
+
+"@polkadot/util-crypto@12.6.1", "@polkadot/util-crypto@^12.5.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-12.6.1.tgz"
+ integrity sha512-2ezWFLmdgeDXqB9NAUdgpp3s2rQztNrZLY+y0SJYNOG4ch+PyodTW/qSksnOrVGVdRhZ5OESRE9xvo9LYV5UAw==
+ dependencies:
+ "@noble/curves" "^1.2.0"
+ "@noble/hashes" "^1.3.2"
+ "@polkadot/networks" "12.6.1"
+ "@polkadot/util" "12.6.1"
+ "@polkadot/wasm-crypto" "^7.3.1"
+ "@polkadot/wasm-util" "^7.3.1"
+ "@polkadot/x-bigint" "12.6.1"
+ "@polkadot/x-randomvalues" "12.6.1"
+ "@scure/base" "^1.1.3"
+ tslib "^2.6.2"
+
+"@polkadot/util-crypto@12.6.2", "@polkadot/util-crypto@^12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-12.6.2.tgz#d2d51010e8e8ca88951b7d864add797dad18bbfc"
+ integrity sha512-FEWI/dJ7wDMNN1WOzZAjQoIcCP/3vz3wvAp5QQm+lOrzOLj0iDmaIGIcBkz8HVm3ErfSe/uKP0KS4jgV/ib+Mg==
+ dependencies:
+ "@noble/curves" "^1.3.0"
+ "@noble/hashes" "^1.3.3"
+ "@polkadot/networks" "12.6.2"
+ "@polkadot/util" "12.6.2"
+ "@polkadot/wasm-crypto" "^7.3.2"
+ "@polkadot/wasm-util" "^7.3.2"
+ "@polkadot/x-bigint" "12.6.2"
+ "@polkadot/x-randomvalues" "12.6.2"
+ "@scure/base" "^1.1.5"
+ tslib "^2.6.2"
+
+"@polkadot/util@12.6.1", "@polkadot/util@^12.5.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/util/-/util-12.6.1.tgz"
+ integrity sha512-10ra3VfXtK8ZSnWI7zjhvRrhupg3rd4iFC3zCaXmRpOU+AmfIoCFVEmuUuC66gyXiz2/g6k5E6j0lWQCOProSQ==
+ dependencies:
+ "@polkadot/x-bigint" "12.6.1"
+ "@polkadot/x-global" "12.6.1"
+ "@polkadot/x-textdecoder" "12.6.1"
+ "@polkadot/x-textencoder" "12.6.1"
+ "@types/bn.js" "^5.1.5"
+ bn.js "^5.2.1"
+ tslib "^2.6.2"
+
+"@polkadot/util@12.6.2", "@polkadot/util@^12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.6.2.tgz#9396eff491221e1f0fd28feac55fc16ecd61a8dc"
+ integrity sha512-l8TubR7CLEY47240uki0TQzFvtnxFIO7uI/0GoWzpYD/O62EIAMRsuY01N4DuwgKq2ZWD59WhzsLYmA5K6ksdw==
+ dependencies:
+ "@polkadot/x-bigint" "12.6.2"
+ "@polkadot/x-global" "12.6.2"
+ "@polkadot/x-textdecoder" "12.6.2"
+ "@polkadot/x-textencoder" "12.6.2"
+ "@types/bn.js" "^5.1.5"
+ bn.js "^5.2.1"
+ tslib "^2.6.2"
+
+"@polkadot/util@^7.3.2":
+ version "7.9.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-7.9.2.tgz#567ac659516d6b685ed7e796919901d92e5cbe6b"
+ integrity sha512-6ABY6ErgkCsM4C6+X+AJSY4pBGwbKlHZmUtHftaiTvbaj4XuA4nTo3GU28jw8wY0Jh2cJZJvt6/BJ5GVkm5tBA==
+ dependencies:
+ "@babel/runtime" "^7.16.3"
+ "@polkadot/x-textdecoder" "7.9.2"
+ "@polkadot/x-textencoder" "7.9.2"
+ "@types/bn.js" "^4.11.6"
+ bn.js "^4.12.0"
+ camelcase "^6.2.1"
+ ip-regex "^4.3.0"
+
+"@polkadot/wasm-bridge@7.3.1":
+ version "7.3.1"
+ resolved "https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-7.3.1.tgz"
+ integrity sha512-wPtDkGaOQx5BUIYP+kJv5aV3BnCQ+HXr36khGKYrRQAMBrG+ybCNPOTVXDQnSbraPQRSw7fSIJmiQpEmFsIz0w==
+ dependencies:
+ "@polkadot/wasm-util" "7.3.1"
+ tslib "^2.6.2"
+
+"@polkadot/wasm-bridge@7.3.2":
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.3.2.tgz#e1b01906b19e06cbca3d94f10f5666f2ae0baadc"
+ integrity sha512-AJEXChcf/nKXd5Q/YLEV5dXQMle3UNT7jcXYmIffZAo/KI394a+/24PaISyQjoNC0fkzS1Q8T5pnGGHmXiVz2g==
+ dependencies:
+ "@polkadot/wasm-util" "7.3.2"
+ tslib "^2.6.2"
+
+"@polkadot/wasm-crypto-asmjs@7.3.1":
+ version "7.3.1"
+ resolved "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.3.1.tgz"
+ integrity sha512-pTUOCIP0nUc4tjzdG1vtEBztKEWde4DBEZm7NaxBLvwNUxsbYhLKYvuhASEyEIz0ZyE4rOBWEmRF4Buic8oO+g==
+ dependencies:
+ tslib "^2.6.2"
+
+"@polkadot/wasm-crypto-asmjs@7.3.2":
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.3.2.tgz#c6d41bc4b48b5359d57a24ca3066d239f2d70a34"
+ integrity sha512-QP5eiUqUFur/2UoF2KKKYJcesc71fXhQFLT3D4ZjG28Mfk2ZPI0QNRUfpcxVQmIUpV5USHg4geCBNuCYsMm20Q==
+ dependencies:
+ tslib "^2.6.2"
+
+"@polkadot/wasm-crypto-init@7.3.1":
+ version "7.3.1"
+ resolved "https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.3.1.tgz"
+ integrity sha512-Fx15ItLcxCe7uJCWZVXhFbsrXqHUKAp9KGYQFKBRK7r1C2va4Y7qnirjwkxoMHQcunusLe2KdbrD+YJuzh4wlA==
+ dependencies:
+ "@polkadot/wasm-bridge" "7.3.1"
+ "@polkadot/wasm-crypto-asmjs" "7.3.1"
+ "@polkadot/wasm-crypto-wasm" "7.3.1"
+ "@polkadot/wasm-util" "7.3.1"
+ tslib "^2.6.2"
+
+"@polkadot/wasm-crypto-init@7.3.2":
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.3.2.tgz#7e1fe79ba978fb0a4a0f74a92d976299d38bc4b8"
+ integrity sha512-FPq73zGmvZtnuJaFV44brze3Lkrki3b4PebxCy9Fplw8nTmisKo9Xxtfew08r0njyYh+uiJRAxPCXadkC9sc8g==
+ dependencies:
+ "@polkadot/wasm-bridge" "7.3.2"
+ "@polkadot/wasm-crypto-asmjs" "7.3.2"
+ "@polkadot/wasm-crypto-wasm" "7.3.2"
+ "@polkadot/wasm-util" "7.3.2"
+ tslib "^2.6.2"
+
+"@polkadot/wasm-crypto-wasm@7.3.1":
+ version "7.3.1"
+ resolved "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.3.1.tgz"
+ integrity sha512-hBMRwrBLCfVsFHSdnwwIxEPshoZdW/dHehYRxMSpUdmqOxtD1gnjocXGE1KZUYGX675+EFuR+Ch6OoTKFJxwTA==
+ dependencies:
+ "@polkadot/wasm-util" "7.3.1"
+ tslib "^2.6.2"
+
+"@polkadot/wasm-crypto-wasm@7.3.2":
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.3.2.tgz#44e08ed5cf6499ce4a3aa7247071a5d01f6a74f4"
+ integrity sha512-15wd0EMv9IXs5Abp1ZKpKKAVyZPhATIAHfKsyoWCEFDLSOA0/K0QGOxzrAlsrdUkiKZOq7uzSIgIDgW8okx2Mw==
+ dependencies:
+ "@polkadot/wasm-util" "7.3.2"
+ tslib "^2.6.2"
+
+"@polkadot/wasm-crypto@^7.3.1":
+ version "7.3.1"
+ resolved "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-7.3.1.tgz"
+ integrity sha512-BSK0YyCN4ohjtwbiHG71fgf+7ufgfLrHxjn7pKsvXhyeiEVuDhbDreNcpUf3eGOJ5tNk75aSbKGF4a3EJGIiNA==
+ dependencies:
+ "@polkadot/wasm-bridge" "7.3.1"
+ "@polkadot/wasm-crypto-asmjs" "7.3.1"
+ "@polkadot/wasm-crypto-init" "7.3.1"
+ "@polkadot/wasm-crypto-wasm" "7.3.1"
+ "@polkadot/wasm-util" "7.3.1"
+ tslib "^2.6.2"
+
+"@polkadot/wasm-crypto@^7.3.2":
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.3.2.tgz#61bbcd9e591500705c8c591e6aff7654bdc8afc9"
+ integrity sha512-+neIDLSJ6jjVXsjyZ5oLSv16oIpwp+PxFqTUaZdZDoA2EyFRQB8pP7+qLsMNk+WJuhuJ4qXil/7XiOnZYZ+wxw==
+ dependencies:
+ "@polkadot/wasm-bridge" "7.3.2"
+ "@polkadot/wasm-crypto-asmjs" "7.3.2"
+ "@polkadot/wasm-crypto-init" "7.3.2"
+ "@polkadot/wasm-crypto-wasm" "7.3.2"
+ "@polkadot/wasm-util" "7.3.2"
+ tslib "^2.6.2"
+
+"@polkadot/wasm-util@7.3.1", "@polkadot/wasm-util@^7.3.1":
+ version "7.3.1"
+ resolved "https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-7.3.1.tgz"
+ integrity sha512-0m6ozYwBrJgnGl6QvS37ZiGRu4FFPPEtMYEVssfo1Tz4skHJlByWaHWhRNoNCVFAKiGEBu+rfx5HAQMAhoPkvg==
+ dependencies:
+ tslib "^2.6.2"
+
+"@polkadot/wasm-util@7.3.2", "@polkadot/wasm-util@^7.3.2":
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.3.2.tgz#4fe6370d2b029679b41a5c02cd7ebf42f9b28de1"
+ integrity sha512-bmD+Dxo1lTZyZNxbyPE380wd82QsX+43mgCm40boyKrRppXEyQmWT98v/Poc7chLuskYb6X8IQ6lvvK2bGR4Tg==
+ dependencies:
+ tslib "^2.6.2"
+
+"@polkadot/x-bigint@12.6.1", "@polkadot/x-bigint@^12.5.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-12.6.1.tgz"
+ integrity sha512-YlABeVIlgYQZJ4ZpW/+akFGGxw5jMGt4g5vaP7EumlORGneJHzzWJYDmI5v2y7j1zvC9ofOle7z4tRmtN/QDew==
+ dependencies:
+ "@polkadot/x-global" "12.6.1"
+ tslib "^2.6.2"
+
+"@polkadot/x-bigint@12.6.2", "@polkadot/x-bigint@^12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.6.2.tgz#59b7a615f205ae65e1ac67194aefde94d3344580"
+ integrity sha512-HSIk60uFPX4GOFZSnIF7VYJz7WZA7tpFJsne7SzxOooRwMTWEtw3fUpFy5cYYOeLh17/kHH1Y7SVcuxzVLc74Q==
+ dependencies:
+ "@polkadot/x-global" "12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/x-fetch@^12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-12.6.2.tgz#b1bca028db90263bafbad2636c18d838d842d439"
+ integrity sha512-8wM/Z9JJPWN1pzSpU7XxTI1ldj/AfC8hKioBlUahZ8gUiJaOF7K9XEFCrCDLis/A1BoOu7Ne6WMx/vsJJIbDWw==
+ dependencies:
+ "@polkadot/x-global" "12.6.2"
+ node-fetch "^3.3.2"
+ tslib "^2.6.2"
+
+"@polkadot/x-global@12.6.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/x-global/-/x-global-12.6.1.tgz"
+ integrity sha512-w5t19HIdBPuyu7X/AiCyH2DsKqxBF0KpF4Ymolnx8PfcSIgnq9ZOmgs74McPR6FgEmeEkr9uNKujZrsfURi1ug==
+ dependencies:
+ tslib "^2.6.2"
+
+"@polkadot/x-global@12.6.2", "@polkadot/x-global@^12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-12.6.2.tgz#31d4de1c3d4c44e4be3219555a6d91091decc4ec"
+ integrity sha512-a8d6m+PW98jmsYDtAWp88qS4dl8DyqUBsd0S+WgyfSMtpEXu6v9nXDgPZgwF5xdDvXhm+P0ZfVkVTnIGrScb5g==
+ dependencies:
+ tslib "^2.6.2"
+
+"@polkadot/x-global@7.9.2":
+ version "7.9.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-7.9.2.tgz#b272b0a3bedaad3bcbf075ec4682abe68cf2a850"
+ integrity sha512-JX5CrGWckHf1P9xKXq4vQCAuMUbL81l2hOWX7xeP8nv4caHEpmf5T1wD1iMdQBL5PFifo6Pg0V6/oZBB+bts7A==
+ dependencies:
+ "@babel/runtime" "^7.16.3"
+
+"@polkadot/x-randomvalues@12.6.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-12.6.1.tgz"
+ integrity sha512-1uVKlfYYbgIgGV5v1Dgn960cGovenWm5pmg+aTMeUGXVYiJwRD2zOpLyC1i/tP454iA74j74pmWb8Nkn0tJZUQ==
+ dependencies:
+ "@polkadot/x-global" "12.6.1"
+ tslib "^2.6.2"
+
+"@polkadot/x-randomvalues@12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.6.2.tgz#13fe3619368b8bf5cb73781554859b5ff9d900a2"
+ integrity sha512-Vr8uG7rH2IcNJwtyf5ebdODMcr0XjoCpUbI91Zv6AlKVYOGKZlKLYJHIwpTaKKB+7KPWyQrk4Mlym/rS7v9feg==
+ dependencies:
+ "@polkadot/x-global" "12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/x-textdecoder@12.6.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-12.6.1.tgz"
+ integrity sha512-IasodJeV1f2Nr/VtA207+LXCQEqYcG8y9qB/EQcRsrEP58NbwwxM5Z2obV0lSjJOxRTJ4/OlhUwnLHwcbIp6+g==
+ dependencies:
+ "@polkadot/x-global" "12.6.1"
+ tslib "^2.6.2"
+
+"@polkadot/x-textdecoder@12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.6.2.tgz#b86da0f8e8178f1ca31a7158257e92aea90b10e4"
+ integrity sha512-M1Bir7tYvNappfpFWXOJcnxUhBUFWkUFIdJSyH0zs5LmFtFdbKAeiDXxSp2Swp5ddOZdZgPac294/o2TnQKN1w==
+ dependencies:
+ "@polkadot/x-global" "12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/x-textdecoder@7.9.2":
+ version "7.9.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-7.9.2.tgz#a78548e33efeb3a25f761fec9787b2bcae7f0608"
+ integrity sha512-wfwbSHXPhrOAl12QvlIOGNkMH/N/h8PId2ytIjvM/8zPPFB5Il6DWSFLtVapOGEpIFjEWbd5t8Td4pHBVXIEbg==
+ dependencies:
+ "@babel/runtime" "^7.16.3"
+ "@polkadot/x-global" "7.9.2"
+
+"@polkadot/x-textencoder@12.6.1":
+ version "12.6.1"
+ resolved "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-12.6.1.tgz"
+ integrity sha512-sTq/+tXqBhGe01a1rjieSHFh3y935vuRgtahVgVJZnfqh5SmLPgSN5tTPxZWzyx7gHIfotle8laTJbJarv7V1A==
+ dependencies:
+ "@polkadot/x-global" "12.6.1"
+ tslib "^2.6.2"
+
+"@polkadot/x-textencoder@12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.6.2.tgz#81d23bd904a2c36137a395c865c5fefa21abfb44"
+ integrity sha512-4N+3UVCpI489tUJ6cv3uf0PjOHvgGp9Dl+SZRLgFGt9mvxnvpW/7+XBADRMtlG4xi5gaRK7bgl5bmY6OMDsNdw==
+ dependencies:
+ "@polkadot/x-global" "12.6.2"
+ tslib "^2.6.2"
+
+"@polkadot/x-textencoder@7.9.2":
+ version "7.9.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-7.9.2.tgz#b32bfd6fbff8587c56452f58252a52d62bbcd5b9"
+ integrity sha512-A19wwYINuZwU2dUyQ/mMzB0ISjyfc4cISfL4zCMUAVgj7xVoXMYV2GfjNdMpA8Wsjch3su6pxLbtJ2wU03sRTQ==
+ dependencies:
+ "@babel/runtime" "^7.16.3"
+ "@polkadot/x-global" "7.9.2"
+
+"@polkadot/x-ws@^12.6.2":
+ version "12.6.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-12.6.2.tgz#b99094d8e53a03be1de903d13ba59adaaabc767a"
+ integrity sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw==
+ dependencies:
+ "@polkadot/x-global" "12.6.2"
+ tslib "^2.6.2"
+ ws "^8.15.1"
+
+"@scure/base@^1.1.1", "@scure/base@^1.1.5":
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.8.tgz#8f23646c352f020c83bca750a82789e246d42b50"
+ integrity sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==
+
+"@scure/base@^1.1.3":
+ version "1.1.3"
+ resolved "https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz"
+ integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==
+
+"@substrate/connect-extension-protocol@^2.0.0":
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.1.0.tgz#7df153f704702b98559e7e5e8a2ce17881fe1d1d"
+ integrity sha512-Wz5Cbn6S6P4vWfHyrsnPW7g15IAViMaXCk+jYkq4nNEMmzPtTKIEbtxrdDMBKrouOFtYKKp0znx5mh9KTCNqlA==
+
+"@substrate/connect-known-chains@^1.1.1":
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/@substrate/connect-known-chains/-/connect-known-chains-1.4.0.tgz#ee0562056cf98a3ee1103a64fa33ff21d86c69fd"
+ integrity sha512-p/mxn1GobtxJ+7xbIkUH4+/njH1neRHHKTcSGHNOC78Cf6Ch1Xzp082+nMjOBDLQLmraK5PF74AKV3WXHGuALw==
+
+"@substrate/connect@0.8.8":
+ version "0.8.8"
+ resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.8.8.tgz#80879f2241e2bd4f24a9aa25d7997fd91a5e68e3"
+ integrity sha512-zwaxuNEVI9bGt0rT8PEJiXOyebLIo6QN1SyiAHRPBOl6g3Sy0KKdSN8Jmyn++oXhVRD8aIe75/V8ZkS81T+BPQ==
+ dependencies:
+ "@substrate/connect-extension-protocol" "^2.0.0"
+ "@substrate/connect-known-chains" "^1.1.1"
+ "@substrate/light-client-extension-helpers" "^0.0.4"
+ smoldot "2.0.22"
+
+"@substrate/light-client-extension-helpers@^0.0.4":
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-0.0.4.tgz#a5958d5c1aac7df69f55bd90991aa935500f8124"
+ integrity sha512-vfKcigzL0SpiK+u9sX6dq2lQSDtuFLOxIJx2CKPouPEHIs8C+fpsufn52r19GQn+qDhU8POMPHOVoqLktj8UEA==
+ dependencies:
+ "@polkadot-api/client" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@polkadot-api/json-rpc-provider" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@polkadot-api/json-rpc-provider-proxy" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@polkadot-api/substrate-client" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0"
+ "@substrate/connect-extension-protocol" "^2.0.0"
+ "@substrate/connect-known-chains" "^1.1.1"
+ rxjs "^7.8.1"
+
+"@substrate/ss58-registry@^1.44.0":
+ version "1.44.0"
+ resolved "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.44.0.tgz"
+ integrity sha512-7lQ/7mMCzVNSEfDS4BCqnRnKCFKpcOaPrxMeGTXHX1YQzM/m2BBHjbK2C3dJvjv7GYxMiaTq/HdWQj1xS6ss+A==
+
+"@tsconfig/node10@^1.0.7":
+ version "1.0.9"
+ resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz"
+ integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==
+
+"@tsconfig/node12@^1.0.7":
+ version "1.0.11"
+ resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz"
+ integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==
+
+"@tsconfig/node14@^1.0.0":
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz"
+ integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==
+
+"@tsconfig/node16@^1.0.2":
+ version "1.0.4"
+ resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz"
+ integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==
+
+"@types/bn.js@^4.11.6":
+ version "4.11.6"
+ resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c"
+ integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==
+ dependencies:
+ "@types/node" "*"
+
+"@types/bn.js@^5.1.5":
+ version "5.1.5"
+ resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz"
+ integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==
+ dependencies:
+ "@types/node" "*"
+
+"@types/body-parser@*":
+ version "1.19.5"
+ resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz"
+ integrity sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==
+ dependencies:
+ "@types/connect" "*"
+ "@types/node" "*"
+
+"@types/connect@*":
+ version "3.4.38"
+ resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz"
+ integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==
+ dependencies:
+ "@types/node" "*"
+
+"@types/express-serve-static-core@^4.17.33":
+ version "4.17.41"
+ resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz"
+ integrity sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==
+ dependencies:
+ "@types/node" "*"
+ "@types/qs" "*"
+ "@types/range-parser" "*"
+ "@types/send" "*"
+
+"@types/express@^4.17.17":
+ version "4.17.21"
+ resolved "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz"
+ integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==
+ dependencies:
+ "@types/body-parser" "*"
+ "@types/express-serve-static-core" "^4.17.33"
+ "@types/qs" "*"
+ "@types/serve-static" "*"
+
+"@types/http-errors@*":
+ version "2.0.4"
+ resolved "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz"
+ integrity sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==
+
+"@types/mime@*", "@types/mime@^1":
+ version "1.3.5"
+ resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz"
+ integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==
+
+"@types/node@*", "@types/node@^20.10.0":
+ version "20.10.0"
+ resolved "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz"
+ integrity sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==
+ dependencies:
+ undici-types "~5.26.4"
+
+"@types/qs@*":
+ version "6.9.10"
+ resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.10.tgz"
+ integrity sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==
+
+"@types/range-parser@*":
+ version "1.2.7"
+ resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz"
+ integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==
+
+"@types/send@*":
+ version "0.17.4"
+ resolved "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz"
+ integrity sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==
+ dependencies:
+ "@types/mime" "^1"
+ "@types/node" "*"
+
+"@types/serve-static@*":
+ version "1.15.5"
+ resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz"
+ integrity sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==
+ dependencies:
+ "@types/http-errors" "*"
+ "@types/mime" "*"
+ "@types/node" "*"
+
+"@types/strip-bom@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz"
+ integrity sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==
+
+"@types/strip-json-comments@0.0.30":
+ version "0.0.30"
+ resolved "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz"
+ integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==
+
+accepts@~1.3.8:
+ version "1.3.8"
+ resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz"
+ integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
+ dependencies:
+ mime-types "~2.1.34"
+ negotiator "0.6.3"
+
+acorn-walk@^8.1.1:
+ version "8.3.0"
+ resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz"
+ integrity sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==
+
+acorn@^8.4.1:
+ version "8.11.2"
+ resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz"
+ integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==
+
+anymatch@~3.1.2:
+ version "3.1.3"
+ resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz"
+ integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
+ dependencies:
+ normalize-path "^3.0.0"
+ picomatch "^2.0.4"
+
+arg@^4.1.0:
+ version "4.1.3"
+ resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz"
+ integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
+
+array-flatten@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
+ integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==
+
+balanced-match@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz"
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
+
+binary-extensions@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz"
+ integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
+
+bn.js@^4.12.0:
+ version "4.12.0"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
+ integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==
+
+bn.js@^5.2.1:
+ version "5.2.1"
+ resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz"
+ integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==
+
+body-parser@1.20.1:
+ version "1.20.1"
+ resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz"
+ integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==
+ dependencies:
+ bytes "3.1.2"
+ content-type "~1.0.4"
+ debug "2.6.9"
+ depd "2.0.0"
+ destroy "1.2.0"
+ http-errors "2.0.0"
+ iconv-lite "0.4.24"
+ on-finished "2.4.1"
+ qs "6.11.0"
+ raw-body "2.5.1"
+ type-is "~1.6.18"
+ unpipe "1.0.0"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz"
+ integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
+ dependencies:
+ fill-range "^7.0.1"
+
+buffer-from@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz"
+ integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
+
+bytes@3.1.2:
+ version "3.1.2"
+ resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz"
+ integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
+
+call-bind@^1.0.0:
+ version "1.0.5"
+ resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz"
+ integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==
+ dependencies:
+ function-bind "^1.1.2"
+ get-intrinsic "^1.2.1"
+ set-function-length "^1.1.1"
+
+camelcase@^6.2.1:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
+ integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
+
+chokidar@^3.5.1:
+ version "3.5.3"
+ resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz"
+ integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
+ dependencies:
+ anymatch "~3.1.2"
+ braces "~3.0.2"
+ glob-parent "~5.1.2"
+ is-binary-path "~2.1.0"
+ is-glob "~4.0.1"
+ normalize-path "~3.0.0"
+ readdirp "~3.6.0"
+ optionalDependencies:
+ fsevents "~2.3.2"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
+ integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
+
+content-disposition@0.5.4:
+ version "0.5.4"
+ resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz"
+ integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==
+ dependencies:
+ safe-buffer "5.2.1"
+
+content-type@~1.0.4:
+ version "1.0.5"
+ resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz"
+ integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==
+
+cookie-signature@1.0.6:
+ version "1.0.6"
+ resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
+ integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==
+
+cookie@0.5.0:
+ version "0.5.0"
+ resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz"
+ integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
+
+create-require@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz"
+ integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
+
+data-uri-to-buffer@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz"
+ integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==
+
+debug@2.6.9:
+ version "2.6.9"
+ resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+debug@^4.1.0:
+ version "4.3.4"
+ resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
+ integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
+ dependencies:
+ ms "2.1.2"
+
+define-data-property@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz"
+ integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==
+ dependencies:
+ get-intrinsic "^1.2.1"
+ gopd "^1.0.1"
+ has-property-descriptors "^1.0.0"
+
+depd@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz"
+ integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
+
+destroy@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz"
+ integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==
+
+diff@^4.0.1:
+ version "4.0.2"
+ resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz"
+ integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
+
+dotenv@^16.0.3:
+ version "16.3.1"
+ resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz"
+ integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
+
+dynamic-dedupe@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz"
+ integrity sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ==
+ dependencies:
+ xtend "^4.0.0"
+
+ee-first@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
+ integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
+
+encodeurl@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz"
+ integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==
+
+escape-html@~1.0.3:
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
+ integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==
+
+etag@~1.8.1:
+ version "1.8.1"
+ resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz"
+ integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
+
+eventemitter3@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz"
+ integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==
+
+express@^4.18.2:
+ version "4.18.2"
+ resolved "https://registry.npmjs.org/express/-/express-4.18.2.tgz"
+ integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
+ dependencies:
+ accepts "~1.3.8"
+ array-flatten "1.1.1"
+ body-parser "1.20.1"
+ content-disposition "0.5.4"
+ content-type "~1.0.4"
+ cookie "0.5.0"
+ cookie-signature "1.0.6"
+ debug "2.6.9"
+ depd "2.0.0"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ finalhandler "1.2.0"
+ fresh "0.5.2"
+ http-errors "2.0.0"
+ merge-descriptors "1.0.1"
+ methods "~1.1.2"
+ on-finished "2.4.1"
+ parseurl "~1.3.3"
+ path-to-regexp "0.1.7"
+ proxy-addr "~2.0.7"
+ qs "6.11.0"
+ range-parser "~1.2.1"
+ safe-buffer "5.2.1"
+ send "0.18.0"
+ serve-static "1.15.0"
+ setprototypeof "1.2.0"
+ statuses "2.0.1"
+ type-is "~1.6.18"
+ utils-merge "1.0.1"
+ vary "~1.1.2"
+
+fetch-blob@^3.1.2, fetch-blob@^3.1.4:
+ version "3.2.0"
+ resolved "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz"
+ integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==
+ dependencies:
+ node-domexception "^1.0.0"
+ web-streams-polyfill "^3.0.3"
+
+fill-range@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz"
+ integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
+ dependencies:
+ to-regex-range "^5.0.1"
+
+finalhandler@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz"
+ integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==
+ dependencies:
+ debug "2.6.9"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ on-finished "2.4.1"
+ parseurl "~1.3.3"
+ statuses "2.0.1"
+ unpipe "~1.0.0"
+
+formdata-polyfill@^4.0.10:
+ version "4.0.10"
+ resolved "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz"
+ integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==
+ dependencies:
+ fetch-blob "^3.1.2"
+
+forwarded@0.2.0:
+ version "0.2.0"
+ resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz"
+ integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==
+
+fresh@0.5.2:
+ version "0.5.2"
+ resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz"
+ integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
+ integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
+
+fsevents@~2.3.2:
+ version "2.3.3"
+ resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
+
+function-bind@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
+ integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
+
+get-intrinsic@^1.0.2, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz"
+ integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==
+ dependencies:
+ function-bind "^1.1.2"
+ has-proto "^1.0.1"
+ has-symbols "^1.0.3"
+ hasown "^2.0.0"
+
+glob-parent@~5.1.2:
+ version "5.1.2"
+ resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz"
+ integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob@^7.1.3:
+ version "7.2.3"
+ resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz"
+ integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.1.1"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+gopd@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz"
+ integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==
+ dependencies:
+ get-intrinsic "^1.1.3"
+
+has-property-descriptors@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz"
+ integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==
+ dependencies:
+ get-intrinsic "^1.2.2"
+
+has-proto@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz"
+ integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==
+
+has-symbols@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz"
+ integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
+
+hasown@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz"
+ integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==
+ dependencies:
+ function-bind "^1.1.2"
+
+http-errors@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz"
+ integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==
+ dependencies:
+ depd "2.0.0"
+ inherits "2.0.4"
+ setprototypeof "1.2.0"
+ statuses "2.0.1"
+ toidentifier "1.0.1"
+
+iconv-lite@0.4.24:
+ version "0.4.24"
+ resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz"
+ integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@2.0.4:
+ version "2.0.4"
+ resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+ip-regex@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5"
+ integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==
+
+ipaddr.js@1.9.1:
+ version "1.9.1"
+ resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz"
+ integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
+
+is-binary-path@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz"
+ integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
+ dependencies:
+ binary-extensions "^2.0.0"
+
+is-core-module@^2.13.0:
+ version "2.13.1"
+ resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz"
+ integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
+ dependencies:
+ hasown "^2.0.0"
+
+is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz"
+ integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
+
+is-glob@^4.0.1, is-glob@~4.0.1:
+ version "4.0.3"
+ resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz"
+ integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-number@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz"
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
+
+json-stringify-safe@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
+ integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==
+
+make-error@^1.1.1:
+ version "1.3.6"
+ resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz"
+ integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
+
+media-typer@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
+ integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==
+
+merge-descriptors@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
+ integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==
+
+methods@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
+ integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==
+
+mime-db@1.52.0:
+ version "1.52.0"
+ resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz"
+ integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
+
+mime-types@~2.1.24, mime-types@~2.1.34:
+ version "2.1.35"
+ resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz"
+ integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
+ dependencies:
+ mime-db "1.52.0"
+
+mime@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz"
+ integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
+
+minimatch@^3.1.1:
+ version "3.1.2"
+ resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz"
+ integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@^1.2.6:
+ version "1.2.8"
+ resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz"
+ integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
+
+mkdirp@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
+ integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
+
+mock-socket@^9.3.1:
+ version "9.3.1"
+ resolved "https://registry.npmjs.org/mock-socket/-/mock-socket-9.3.1.tgz"
+ integrity sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
+ integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==
+
+ms@2.1.2:
+ version "2.1.2"
+ resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
+ms@2.1.3:
+ version "2.1.3"
+ resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"
+ integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
+
+negotiator@0.6.3:
+ version "0.6.3"
+ resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz"
+ integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
+
+nock@^13.5.0:
+ version "13.5.5"
+ resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.5.tgz#cd1caaca281d42be17d51946367a3d53a6af3e78"
+ integrity sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA==
+ dependencies:
+ debug "^4.1.0"
+ json-stringify-safe "^5.0.1"
+ propagate "^2.0.0"
+
+node-domexception@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz"
+ integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
+
+node-fetch@^3.3.2:
+ version "3.3.2"
+ resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz"
+ integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==
+ dependencies:
+ data-uri-to-buffer "^4.0.0"
+ fetch-blob "^3.1.4"
+ formdata-polyfill "^4.0.10"
+
+normalize-path@^3.0.0, normalize-path@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz"
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
+
+object-inspect@^1.9.0:
+ version "1.13.1"
+ resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz"
+ integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==
+
+on-finished@2.4.1:
+ version "2.4.1"
+ resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz"
+ integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==
+ dependencies:
+ ee-first "1.1.1"
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
+ integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
+ dependencies:
+ wrappy "1"
+
+parseurl@~1.3.3:
+ version "1.3.3"
+ resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz"
+ integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz"
+ integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
+
+path-parse@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz"
+ integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
+
+path-to-regexp@0.1.7:
+ version "0.1.7"
+ resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
+ integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==
+
+picomatch@^2.0.4, picomatch@^2.2.1:
+ version "2.3.1"
+ resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"
+ integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
+
+propagate@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz"
+ integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==
+
+proxy-addr@~2.0.7:
+ version "2.0.7"
+ resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz"
+ integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==
+ dependencies:
+ forwarded "0.2.0"
+ ipaddr.js "1.9.1"
+
+qs@6.11.0:
+ version "6.11.0"
+ resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz"
+ integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
+ dependencies:
+ side-channel "^1.0.4"
+
+range-parser@~1.2.1:
+ version "1.2.1"
+ resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz"
+ integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
+
+raw-body@2.5.1:
+ version "2.5.1"
+ resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz"
+ integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==
+ dependencies:
+ bytes "3.1.2"
+ http-errors "2.0.0"
+ iconv-lite "0.4.24"
+ unpipe "1.0.0"
+
+readdirp@~3.6.0:
+ version "3.6.0"
+ resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz"
+ integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
+ dependencies:
+ picomatch "^2.2.1"
+
+regenerator-runtime@^0.14.0:
+ version "0.14.1"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
+ integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
+
+resolve@^1.0.0:
+ version "1.22.8"
+ resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz"
+ integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==
+ dependencies:
+ is-core-module "^2.13.0"
+ path-parse "^1.0.7"
+ supports-preserve-symlinks-flag "^1.0.0"
+
+rimraf@^2.6.1:
+ version "2.7.1"
+ resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz"
+ integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
+ dependencies:
+ glob "^7.1.3"
+
+rxjs@^7.8.1:
+ version "7.8.1"
+ resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz"
+ integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==
+ dependencies:
+ tslib "^2.1.0"
+
+safe-buffer@5.2.1:
+ version "5.2.1"
+ resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
+ integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
+
+"safer-buffer@>= 2.1.2 < 3":
+ version "2.1.2"
+ resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+scale-ts@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/scale-ts/-/scale-ts-1.6.0.tgz#e9641093c5a9e50f964ddb1607139034e3e932e9"
+ integrity sha512-Ja5VCjNZR8TGKhUumy9clVVxcDpM+YFjAnkMuwQy68Hixio3VRRvWdE3g8T/yC+HXA0ZDQl2TGyUmtmbcVl40Q==
+
+send@0.18.0:
+ version "0.18.0"
+ resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz"
+ integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==
+ dependencies:
+ debug "2.6.9"
+ depd "2.0.0"
+ destroy "1.2.0"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ fresh "0.5.2"
+ http-errors "2.0.0"
+ mime "1.6.0"
+ ms "2.1.3"
+ on-finished "2.4.1"
+ range-parser "~1.2.1"
+ statuses "2.0.1"
+
+serve-static@1.15.0:
+ version "1.15.0"
+ resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz"
+ integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==
+ dependencies:
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ parseurl "~1.3.3"
+ send "0.18.0"
+
+set-function-length@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz"
+ integrity sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==
+ dependencies:
+ define-data-property "^1.1.1"
+ get-intrinsic "^1.2.1"
+ gopd "^1.0.1"
+ has-property-descriptors "^1.0.0"
+
+setprototypeof@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz"
+ integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
+
+side-channel@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz"
+ integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==
+ dependencies:
+ call-bind "^1.0.0"
+ get-intrinsic "^1.0.2"
+ object-inspect "^1.9.0"
+
+smoldot@2.0.22:
+ version "2.0.22"
+ resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-2.0.22.tgz#1e924d2011a31c57416e79a2b97a460f462a31c7"
+ integrity sha512-B50vRgTY6v3baYH6uCgL15tfaag5tcS2o/P5q1OiXcKGv1axZDfz2dzzMuIkVpyMR2ug11F6EAtQlmYBQd292g==
+ dependencies:
+ ws "^8.8.1"
+
+source-map-support@^0.5.12:
+ version "0.5.21"
+ resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz"
+ integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map@^0.6.0:
+ version "0.6.1"
+ resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+
+statuses@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz"
+ integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==
+
+strip-bom@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz"
+ integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==
+
+strip-json-comments@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz"
+ integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==
+
+supports-preserve-symlinks-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz"
+ integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
+
+to-regex-range@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz"
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
+ dependencies:
+ is-number "^7.0.0"
+
+toidentifier@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz"
+ integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
+
+tree-kill@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz"
+ integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==
+
+ts-node-dev@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-2.0.0.tgz"
+ integrity sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==
+ dependencies:
+ chokidar "^3.5.1"
+ dynamic-dedupe "^0.3.0"
+ minimist "^1.2.6"
+ mkdirp "^1.0.4"
+ resolve "^1.0.0"
+ rimraf "^2.6.1"
+ source-map-support "^0.5.12"
+ tree-kill "^1.2.2"
+ ts-node "^10.4.0"
+ tsconfig "^7.0.0"
+
+ts-node@^10.4.0:
+ version "10.9.1"
+ resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz"
+ integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==
+ dependencies:
+ "@cspotcode/source-map-support" "^0.8.0"
+ "@tsconfig/node10" "^1.0.7"
+ "@tsconfig/node12" "^1.0.7"
+ "@tsconfig/node14" "^1.0.0"
+ "@tsconfig/node16" "^1.0.2"
+ acorn "^8.4.1"
+ acorn-walk "^8.1.1"
+ arg "^4.1.0"
+ create-require "^1.1.0"
+ diff "^4.0.1"
+ make-error "^1.1.1"
+ v8-compile-cache-lib "^3.0.1"
+ yn "3.1.1"
+
+tsconfig@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz"
+ integrity sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==
+ dependencies:
+ "@types/strip-bom" "^3.0.0"
+ "@types/strip-json-comments" "0.0.30"
+ strip-bom "^3.0.0"
+ strip-json-comments "^2.0.0"
+
+tslib@^2.1.0, tslib@^2.6.2:
+ version "2.6.2"
+ resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz"
+ integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
+
+type-is@~1.6.18:
+ version "1.6.18"
+ resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz"
+ integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
+ dependencies:
+ media-typer "0.3.0"
+ mime-types "~2.1.24"
+
+types@*:
+ version "0.1.1"
+ resolved "https://registry.npmjs.org/types/-/types-0.1.1.tgz"
+ integrity sha512-JuntZtJj4MKLE9x/XBs7IjsznYhzETwr34pw3XJTKvgYtAMdeMG+o8x8U85E5Lm6eCPa1DdOdGVsHMwq4ZnZAg==
+
+typescript@^5.0.4:
+ version "5.3.2"
+ resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz"
+ integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==
+
+undici-types@~5.26.4:
+ version "5.26.5"
+ resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz"
+ integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
+
+unpipe@1.0.0, unpipe@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
+ integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
+
+utils-merge@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz"
+ integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==
+
+v8-compile-cache-lib@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz"
+ integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
+
+vary@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz"
+ integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
+
+web-streams-polyfill@^3.0.3:
+ version "3.2.1"
+ resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz"
+ integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
+ integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
+
+ws@^8.15.1:
+ version "8.18.0"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
+ integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==
+
+ws@^8.8.1:
+ version "8.14.2"
+ resolved "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz"
+ integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==
+
+xtend@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz"
+ integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
+
+yn@3.1.1:
+ version "3.1.1"
+ resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz"
+ integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
diff --git a/contracts/.cargo/config.toml b/contracts/.cargo/config.toml
deleted file mode 100644
index 31cc3dae8..000000000
--- a/contracts/.cargo/config.toml
+++ /dev/null
@@ -1,17 +0,0 @@
-[alias]
-xtask = "r -rp xtask --"
-
-[build]
-rustflags = [
- "-Wfuture-incompatible",
- "-Wlet-underscore",
- "-Wrust-2018-idioms",
- "-Wunused",
-]
-rustdocflags = [
- "-Dwarnings",
- "--default-theme=ayu",
- "-Wrustdoc::private_doc_tests",
- # TODO: uncomment after the compiler update.
- # "-Wrustdoc::unescaped_backticks",
-]
diff --git a/contracts/Cargo.lock b/contracts/Cargo.lock
index 565f1c39a..f3f3abad5 100644
--- a/contracts/Cargo.lock
+++ b/contracts/Cargo.lock
@@ -14,11 +14,11 @@ dependencies = [
[[package]]
name = "actor-system-error"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df50509e2b16b0a7dcf58c7065fc95576b8e38117fd5e6db119b694320743baa"
+checksum = "660d23b79c18e2b08bacfe9e7ad3be8a4c9c61ac54677f2128e47416c2fbedae"
dependencies = [
- "derive_more",
+ "derive_more 0.99.18",
]
[[package]]
@@ -32,18 +32,18 @@ dependencies = [
[[package]]
name = "addr2line"
-version = "0.21.0"
+version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
dependencies = [
- "gimli 0.28.1",
+ "gimli 0.31.1",
]
[[package]]
-name = "adler"
-version = "1.0.2"
+name = "adler2"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
[[package]]
name = "aead"
@@ -52,32 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
dependencies = [
"crypto-common",
- "generic-array 0.14.7",
-]
-
-[[package]]
-name = "aes"
-version = "0.8.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
-dependencies = [
- "cfg-if",
- "cipher",
- "cpufeatures",
-]
-
-[[package]]
-name = "aes-gcm"
-version = "0.10.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
-dependencies = [
- "aead",
- "aes",
- "cipher",
- "ctr",
- "ghash",
- "subtle",
+ "generic-array",
]
[[package]]
@@ -86,7 +61,7 @@ version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
dependencies = [
- "getrandom 0.2.15",
+ "getrandom",
"once_cell",
"version_check",
]
@@ -98,7 +73,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
"cfg-if",
- "getrandom 0.2.15",
+ "getrandom",
"once_cell",
"version_check",
"zerocopy",
@@ -115,9 +90,9 @@ dependencies = [
[[package]]
name = "allocator-api2"
-version = "0.2.18"
+version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
+checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9"
[[package]]
name = "android-tzdata"
@@ -143,17 +118,85 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "anstream"
+version = "0.6.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
[[package]]
name = "anstyle"
-version = "1.0.7"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.59.0",
+]
[[package]]
name = "anyhow"
-version = "1.0.86"
+version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
+checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775"
+
+[[package]]
+name = "aquamarine"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e"
+dependencies = [
+ "include_dir",
+ "itertools 0.10.5",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "ark-bls12-377"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-std",
+]
[[package]]
name = "ark-bls12-381"
@@ -167,6 +210,25 @@ dependencies = [
"ark-std",
]
+[[package]]
+name = "ark-crypto-primitives"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-relations",
+ "ark-serialize",
+ "ark-snark",
+ "ark-std",
+ "blake2",
+ "derivative",
+ "digest 0.10.7",
+ "rayon",
+ "sha2 0.10.8",
+]
+
[[package]]
name = "ark-ec"
version = "0.4.2"
@@ -179,8 +241,9 @@ dependencies = [
"ark-std",
"derivative",
"hashbrown 0.13.2",
- "itertools",
+ "itertools 0.10.5",
"num-traits",
+ "rayon",
"zeroize",
]
@@ -196,10 +259,11 @@ dependencies = [
"ark-std",
"derivative",
"digest 0.10.7",
- "itertools",
+ "itertools 0.10.5",
"num-bigint",
"num-traits",
"paste",
+ "rayon",
"rustc_version",
"zeroize",
]
@@ -227,6 +291,22 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "ark-groth16"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc"
+dependencies = [
+ "ark-crypto-primitives",
+ "ark-ec",
+ "ark-ff",
+ "ark-poly",
+ "ark-relations",
+ "ark-serialize",
+ "ark-std",
+ "rayon",
+]
+
[[package]]
name = "ark-poly"
version = "0.4.2"
@@ -238,6 +318,19 @@ dependencies = [
"ark-std",
"derivative",
"hashbrown 0.13.2",
+ "rayon",
+]
+
+[[package]]
+name = "ark-relations"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0"
+dependencies = [
+ "ark-ff",
+ "ark-std",
+ "tracing",
+ "tracing-subscriber 0.2.25",
]
[[package]]
@@ -246,6 +339,8 @@ version = "0.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179"
dependencies = [
+ "ark-ec",
+ "ark-ff",
"ark-serialize",
"ark-std",
"parity-scale-codec",
@@ -276,32 +371,39 @@ dependencies = [
]
[[package]]
-name = "ark-std"
+name = "ark-snark"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185"
+checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63"
dependencies = [
- "num-traits",
- "rand 0.8.5",
+ "ark-ff",
+ "ark-relations",
+ "ark-serialize",
+ "ark-std",
]
[[package]]
-name = "array-bytes"
-version = "4.2.0"
+name = "ark-std"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6"
+checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185"
+dependencies = [
+ "num-traits",
+ "rand",
+ "rayon",
+]
[[package]]
name = "array-bytes"
-version = "6.2.2"
+version = "6.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0"
+checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293"
[[package]]
name = "arrayref"
-version = "0.3.7"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545"
+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
[[package]]
name = "arrayvec"
@@ -314,168 +416,131 @@ dependencies = [
[[package]]
name = "arrayvec"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
-
-[[package]]
-name = "arrayvec"
-version = "0.7.4"
+version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
-name = "async-channel"
-version = "1.9.0"
+name = "ascii-canvas"
+version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35"
+checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6"
dependencies = [
- "concurrent-queue",
- "event-listener 2.5.3",
- "futures-core",
+ "term",
]
[[package]]
name = "async-channel"
-version = "2.2.1"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928"
+checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a"
dependencies = [
"concurrent-queue",
- "event-listener 5.3.0",
- "event-listener-strategy 0.5.2",
+ "event-listener-strategy",
"futures-core",
"pin-project-lite",
]
[[package]]
name = "async-executor"
-version = "1.11.0"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a"
+checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec"
dependencies = [
"async-task",
"concurrent-queue",
- "fastrand 2.1.0",
- "futures-lite 2.3.0",
+ "fastrand",
+ "futures-lite",
"slab",
]
[[package]]
name = "async-fs"
-version = "1.6.0"
+version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06"
+checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a"
dependencies = [
- "async-lock 2.8.0",
- "autocfg",
+ "async-lock",
"blocking",
- "futures-lite 1.13.0",
-]
-
-[[package]]
-name = "async-io"
-version = "1.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
-dependencies = [
- "async-lock 2.8.0",
- "autocfg",
- "cfg-if",
- "concurrent-queue",
- "futures-lite 1.13.0",
- "log",
- "parking",
- "polling 2.8.0",
- "rustix 0.37.27",
- "slab",
- "socket2 0.4.10",
- "waker-fn",
+ "futures-lite",
]
[[package]]
name = "async-io"
-version = "2.3.2"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884"
+checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059"
dependencies = [
- "async-lock 3.3.0",
+ "async-lock",
"cfg-if",
"concurrent-queue",
"futures-io",
- "futures-lite 2.3.0",
+ "futures-lite",
"parking",
- "polling 3.7.0",
- "rustix 0.38.34",
+ "polling",
+ "rustix 0.38.41",
"slab",
"tracing",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "async-lock"
-version = "2.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b"
-dependencies = [
- "event-listener 2.5.3",
-]
-
-[[package]]
-name = "async-lock"
-version = "3.3.0"
+version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b"
+checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
dependencies = [
- "event-listener 4.0.3",
- "event-listener-strategy 0.4.0",
+ "event-listener 5.3.1",
+ "event-listener-strategy",
"pin-project-lite",
]
[[package]]
name = "async-net"
-version = "1.8.0"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f"
+checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"
dependencies = [
- "async-io 1.13.0",
+ "async-io",
"blocking",
- "futures-lite 1.13.0",
+ "futures-lite",
]
[[package]]
name = "async-process"
-version = "1.8.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88"
+checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb"
dependencies = [
- "async-io 1.13.0",
- "async-lock 2.8.0",
+ "async-channel",
+ "async-io",
+ "async-lock",
"async-signal",
+ "async-task",
"blocking",
"cfg-if",
- "event-listener 3.1.0",
- "futures-lite 1.13.0",
- "rustix 0.38.34",
- "windows-sys 0.48.0",
+ "event-listener 5.3.1",
+ "futures-lite",
+ "rustix 0.38.41",
+ "tracing",
]
[[package]]
name = "async-signal"
-version = "0.2.6"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda"
+checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3"
dependencies = [
- "async-io 2.3.2",
- "async-lock 3.3.0",
+ "async-io",
+ "async-lock",
"atomic-waker",
"cfg-if",
"futures-core",
"futures-io",
- "rustix 0.38.34",
+ "rustix 0.38.41",
"signal-hook-registry",
"slab",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -486,20 +551,20 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]]
name = "async-trait"
-version = "0.1.80"
+version = "0.1.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
+checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
-name = "atomic"
-version = "0.5.3"
+name = "atomic-take"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba"
+checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3"
[[package]]
name = "atomic-waker"
@@ -508,64 +573,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
-name = "auto-changed-nft"
-version = "1.1.0"
-dependencies = [
- "auto-changed-nft-io",
- "gclient",
- "gear-lib-derive",
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "hex-literal",
- "primitive-types",
- "sp-core 21.0.0",
- "sp-core-hashing 10.0.0",
- "tokio",
-]
-
-[[package]]
-name = "auto-changed-nft-io"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "auto-changed-nft-state"
-version = "1.1.0"
+name = "atomic_enum"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99e1aca718ea7b89985790c94aad72d77533063fe00bc497bb79a7c2dae6a661"
dependencies = [
- "auto-changed-nft-io",
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
]
[[package]]
name = "autocfg"
-version = "1.3.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "backtrace"
-version = "0.3.71"
+version = "0.3.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d"
+checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
dependencies = [
- "addr2line 0.21.0",
- "cc",
+ "addr2line 0.24.2",
"cfg-if",
"libc",
"miniz_oxide",
- "object 0.32.2",
+ "object 0.36.5",
"rustc-demangle",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -592,12 +628,51 @@ version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
[[package]]
name = "base64ct"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+[[package]]
+name = "battle"
+version = "1.1.0"
+dependencies = [
+ "battle",
+ "battle-app",
+ "battle-client",
+ "gstd",
+ "gtest",
+ "sails-idl-gen",
+ "sails-rs",
+ "tokio",
+]
+
+[[package]]
+name = "battle-app"
+version = "0.1.0"
+dependencies = [
+ "gstd",
+ "sails-rs",
+]
+
+[[package]]
+name = "battle-client"
+version = "1.1.0"
+dependencies = [
+ "battle-app",
+ "mockall",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
+]
+
[[package]]
name = "battleship"
version = "1.1.0"
@@ -652,18 +727,43 @@ dependencies = [
[[package]]
name = "bip39"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f"
+checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387"
dependencies = [
"bitcoin_hashes",
]
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
+[[package]]
+name = "bitcoin-internals"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb"
+
[[package]]
name = "bitcoin_hashes"
-version = "0.11.0"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4"
+checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b"
+dependencies = [
+ "bitcoin-internals",
+ "hex-conservative",
+]
[[package]]
name = "bitflags"
@@ -673,9 +773,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.5.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "bitvec"
@@ -715,33 +815,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780"
dependencies = [
"arrayref",
- "arrayvec 0.7.4",
- "constant_time_eq 0.3.0",
+ "arrayvec 0.7.6",
+ "constant_time_eq 0.3.1",
]
[[package]]
name = "blake3"
-version = "1.5.1"
+version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52"
+checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e"
dependencies = [
"arrayref",
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"cc",
"cfg-if",
- "constant_time_eq 0.3.0",
-]
-
-[[package]]
-name = "block-buffer"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
-dependencies = [
- "block-padding",
- "byte-tools",
- "byteorder",
- "generic-array 0.12.4",
+ "constant_time_eq 0.3.1",
]
[[package]]
@@ -750,7 +838,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [
- "generic-array 0.14.7",
+ "generic-array",
]
[[package]]
@@ -759,37 +847,27 @@ version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
- "generic-array 0.14.7",
-]
-
-[[package]]
-name = "block-padding"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
-dependencies = [
- "byte-tools",
+ "generic-array",
]
[[package]]
name = "blocking"
-version = "1.6.0"
+version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88"
+checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea"
dependencies = [
- "async-channel 2.2.1",
- "async-lock 3.3.0",
+ "async-channel",
"async-task",
"futures-io",
- "futures-lite 2.3.0",
+ "futures-lite",
"piper",
]
[[package]]
name = "bounded-collections"
-version = "0.1.9"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd"
+checksum = "3d077619e9c237a5d1875166f5e8033e8f6bff0c96f8caf81e1c2d7738c431bf"
dependencies = [
"log",
"parity-scale-codec",
@@ -797,12 +875,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "bs58"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
-
[[package]]
name = "bs58"
version = "0.5.1"
@@ -824,12 +896,6 @@ version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c"
-[[package]]
-name = "byte-tools"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
-
[[package]]
name = "bytecheck"
version = "0.6.12"
@@ -860,75 +926,105 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.6.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9"
+checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
[[package]]
name = "camino"
-version = "1.1.6"
+version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c"
+checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
dependencies = [
"serde",
]
[[package]]
-name = "car-1"
-version = "0.1.0"
+name = "car-races"
+version = "1.1.0"
dependencies = [
+ "car-races-app",
"gear-wasm-builder",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
+]
+
+[[package]]
+name = "car-races-app"
+version = "1.1.0"
+dependencies = [
"gstd",
+ "gtest",
"parity-scale-codec",
+ "sails-client-gen",
+ "sails-rs",
"scale-info",
+ "session-service",
]
[[package]]
-name = "car-2"
+name = "car-strategy-1"
version = "0.1.0"
dependencies = [
+ "car-strategy-1",
+ "car-strategy-app-1",
"gear-wasm-builder",
- "gstd",
- "parity-scale-codec",
- "scale-info",
+ "sails-idl-gen",
+ "sails-rs",
+ "tokio",
]
[[package]]
-name = "car-3"
+name = "car-strategy-2"
version = "0.1.0"
dependencies = [
+ "car-strategy-2",
+ "car-strategy-app-2",
"gear-wasm-builder",
- "gstd",
+ "sails-idl-gen",
+ "sails-rs",
+ "tokio",
+]
+
+[[package]]
+name = "car-strategy-3"
+version = "0.1.0"
+dependencies = [
+ "car-strategy-3",
+ "car-strategy-app-3",
+ "gear-wasm-builder",
+ "sails-idl-gen",
+ "sails-rs",
+ "tokio",
+]
+
+[[package]]
+name = "car-strategy-app-1"
+version = "0.1.0"
+dependencies = [
"parity-scale-codec",
+ "sails-rs",
"scale-info",
]
[[package]]
-name = "car-races"
-version = "1.1.0"
+name = "car-strategy-app-2"
+version = "0.1.0"
dependencies = [
- "car-1",
- "car-2",
- "car-3",
- "car-races-io",
- "gclient",
- "gear-core",
- "gear-wasm-builder",
"gstd",
- "gtest",
- "hex",
- "primitive-types",
- "tokio",
+ "parity-scale-codec",
+ "sails-rs",
+ "scale-info",
]
[[package]]
-name = "car-races-io"
+name = "car-strategy-app-3"
version = "0.1.0"
dependencies = [
- "gmeta",
"gstd",
"parity-scale-codec",
- "primitive-types",
+ "sails-rs",
"scale-info",
]
@@ -967,9 +1063,18 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.0.97"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"
+dependencies = [
+ "shlex",
+]
+
+[[package]]
+name = "cesu8"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4"
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cfg-expr"
@@ -986,6 +1091,12 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+[[package]]
+name = "cfg_aliases"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+
[[package]]
name = "chacha20"
version = "0.9.1"
@@ -997,19 +1108,6 @@ dependencies = [
"cpufeatures",
]
-[[package]]
-name = "chacha20poly1305"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
-dependencies = [
- "aead",
- "chacha20",
- "cipher",
- "poly1305",
- "zeroize",
-]
-
[[package]]
name = "chrono"
version = "0.4.38"
@@ -1021,7 +1119,7 @@ dependencies = [
"js-sys",
"num-traits",
"wasm-bindgen",
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -1032,76 +1130,71 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
"crypto-common",
"inout",
- "zeroize",
]
[[package]]
-name = "clap"
-version = "4.5.4"
+name = "cmake"
+version = "0.1.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0"
+checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e"
dependencies = [
- "clap_builder",
+ "cc",
]
[[package]]
-name = "clap_builder"
-version = "4.5.2"
+name = "colorchoice"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"
-dependencies = [
- "anstyle",
- "clap_lex",
-]
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
-name = "clap_lex"
-version = "0.7.0"
+name = "colored"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
+checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
+dependencies = [
+ "lazy_static",
+ "windows-sys 0.48.0",
+]
[[package]]
-name = "cmake"
-version = "0.1.50"
+name = "combine"
+version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130"
+checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
dependencies = [
- "cc",
+ "bytes",
+ "memchr",
]
[[package]]
-name = "colored"
-version = "2.1.0"
+name = "common-path"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
-dependencies = [
- "lazy_static",
- "windows-sys 0.48.0",
-]
+checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101"
[[package]]
name = "concert"
version = "1.1.0"
dependencies = [
- "concert-io",
- "gclient",
+ "concert-app",
"gear-wasm-builder",
- "gstd",
- "gtest",
- "multi-token",
- "multi-token-io",
- "tokio",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
-name = "concert-io"
+name = "concert-app"
version = "1.1.0"
dependencies = [
- "gmeta",
+ "concert",
+ "extended-vmt",
+ "extended-vmt-client",
+ "gclient",
"gstd",
- "multi-token-io",
- "parity-scale-codec",
- "scale-info",
+ "sails-rs",
+ "tokio",
]
[[package]]
@@ -1134,25 +1227,25 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
dependencies = [
- "getrandom 0.2.15",
+ "getrandom",
"once_cell",
"tiny-keccak",
]
[[package]]
name = "const_format"
-version = "0.2.32"
+version = "0.2.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673"
+checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b"
dependencies = [
"const_format_proc_macros",
]
[[package]]
name = "const_format_proc_macros"
-version = "0.2.32"
+version = "0.2.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500"
+checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1"
dependencies = [
"proc-macro2",
"quote",
@@ -1167,9 +1260,15 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "constant_time_eq"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2"
+checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
+
+[[package]]
+name = "constcat"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08"
[[package]]
name = "convert_case"
@@ -1177,6 +1276,15 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
+[[package]]
+name = "convert_case"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
+dependencies = [
+ "unicode-segmentation",
+]
+
[[package]]
name = "core-foundation"
version = "0.9.4"
@@ -1189,18 +1297,18 @@ dependencies = [
[[package]]
name = "core-foundation-sys"
-version = "0.8.6"
+version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "core-processor"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b7005388219d8915f8e21c2a662bbf26e63302122b012011659dc40b44e08df"
+checksum = "7d37660aaf8ac40103dc90cc41a181826a725c0a4750267c1c60d7ccf7661c7c"
dependencies = [
"actor-system-error",
- "derive_more",
+ "derive_more 0.99.18",
"gear-core",
"gear-core-backend",
"gear-core-errors",
@@ -1208,6 +1316,7 @@ dependencies = [
"gear-wasm-instrument",
"gsys",
"log",
+ "parity-scale-codec",
"scale-info",
]
@@ -1235,60 +1344,13 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.2.12"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
+checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
dependencies = [
"libc",
]
-[[package]]
-name = "cranelift-bforest"
-version = "0.82.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75"
-dependencies = [
- "cranelift-entity 0.82.3",
-]
-
-[[package]]
-name = "cranelift-codegen"
-version = "0.82.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b"
-dependencies = [
- "cranelift-bforest",
- "cranelift-codegen-meta",
- "cranelift-codegen-shared",
- "cranelift-entity 0.82.3",
- "gimli 0.26.2",
- "log",
- "regalloc",
- "smallvec",
- "target-lexicon",
-]
-
-[[package]]
-name = "cranelift-codegen-meta"
-version = "0.82.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24"
-dependencies = [
- "cranelift-codegen-shared",
-]
-
-[[package]]
-name = "cranelift-codegen-shared"
-version = "0.82.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc"
-
-[[package]]
-name = "cranelift-entity"
-version = "0.82.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf"
-
[[package]]
name = "cranelift-entity"
version = "0.95.1"
@@ -1298,23 +1360,11 @@ dependencies = [
"serde",
]
-[[package]]
-name = "cranelift-frontend"
-version = "0.82.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce"
-dependencies = [
- "cranelift-codegen",
- "log",
- "smallvec",
- "target-lexicon",
-]
-
[[package]]
name = "crc32fast"
-version = "1.4.0"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
@@ -1349,44 +1399,9 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.8.19"
+version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
-
-[[package]]
-name = "crowdsale"
-version = "1.1.0"
-dependencies = [
- "crowdsale-io",
- "gclient",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
- "tokio",
-]
-
-[[package]]
-name = "crowdsale-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "crowdsale-state"
-version = "1.1.0"
-dependencies = [
- "crowdsale-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
-]
+checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crunchy"
@@ -1400,8 +1415,8 @@ version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
dependencies = [
- "generic-array 0.14.7",
- "rand_core 0.6.4",
+ "generic-array",
+ "rand_core",
"subtle",
"zeroize",
]
@@ -1412,8 +1427,8 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
- "generic-array 0.14.7",
- "rand_core 0.6.4",
+ "generic-array",
+ "rand_core",
"typenum",
]
@@ -1423,67 +1438,21 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
dependencies = [
- "generic-array 0.14.7",
- "subtle",
-]
-
-[[package]]
-name = "crypto-mac"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
-dependencies = [
- "generic-array 0.14.7",
- "subtle",
-]
-
-[[package]]
-name = "ctr"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
-dependencies = [
- "cipher",
-]
-
-[[package]]
-name = "curve25519-dalek"
-version = "2.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216"
-dependencies = [
- "byteorder",
- "digest 0.8.1",
- "rand_core 0.5.1",
- "subtle",
- "zeroize",
-]
-
-[[package]]
-name = "curve25519-dalek"
-version = "3.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61"
-dependencies = [
- "byteorder",
- "digest 0.9.0",
- "rand_core 0.5.1",
+ "generic-array",
"subtle",
- "zeroize",
]
[[package]]
name = "curve25519-dalek"
-version = "4.1.2"
+version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"digest 0.10.7",
"fiat-crypto",
- "platforms",
"rustc_version",
"subtle",
"zeroize",
@@ -1497,7 +1466,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
@@ -1508,94 +1477,29 @@ checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8"
dependencies = [
"byteorder",
"digest 0.9.0",
- "rand_core 0.6.4",
+ "rand_core",
"subtle-ng",
"zeroize",
]
[[package]]
-name = "dao"
-version = "1.1.0"
+name = "darling"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
dependencies = [
- "blake2-rfc",
- "dao-io",
- "gclient",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
- "tokio",
+ "darling_core 0.14.4",
+ "darling_macro 0.14.4",
]
[[package]]
-name = "dao-io"
-version = "1.1.0"
+name = "darling"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
dependencies = [
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "dao-light"
-version = "1.1.0"
-dependencies = [
- "dao-light-io",
- "fungible-token",
- "fungible-token-io",
- "gear-wasm-builder",
- "gstd",
- "gtest",
-]
-
-[[package]]
-name = "dao-light-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "dao-light-state"
-version = "1.1.0"
-dependencies = [
- "dao-light-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "dao-state"
-version = "1.1.0"
-dependencies = [
- "dao-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "darling"
-version = "0.14.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
-dependencies = [
- "darling_core 0.14.4",
- "darling_macro 0.14.4",
-]
-
-[[package]]
-name = "darling"
-version = "0.20.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391"
-dependencies = [
- "darling_core 0.20.8",
- "darling_macro 0.20.8",
+ "darling_core 0.20.10",
+ "darling_macro 0.20.10",
]
[[package]]
@@ -1608,22 +1512,22 @@ dependencies = [
"ident_case",
"proc-macro2",
"quote",
- "strsim",
+ "strsim 0.10.0",
"syn 1.0.109",
]
[[package]]
name = "darling_core"
-version = "0.20.8"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f"
+checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
- "strsim",
- "syn 2.0.72",
+ "strsim 0.11.1",
+ "syn 2.0.89",
]
[[package]]
@@ -1639,98 +1543,34 @@ dependencies = [
[[package]]
name = "darling_macro"
-version = "0.20.8"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
+checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
- "darling_core 0.20.8",
+ "darling_core 0.20.10",
"quote",
- "syn 2.0.72",
-]
-
-[[package]]
-name = "decentralized-git"
-version = "1.1.0"
-dependencies = [
- "decentralized-git-io",
- "decentralized-git-user-io",
- "gear-wasm-builder",
- "gstd",
-]
-
-[[package]]
-name = "decentralized-git-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "decentralized-git-master"
-version = "1.1.0"
-dependencies = [
- "decentralized-git-master-io",
- "decentralized-git-user-io",
- "gear-wasm-builder",
- "gstd",
-]
-
-[[package]]
-name = "decentralized-git-master-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
+ "syn 2.0.89",
]
[[package]]
-name = "decentralized-git-master-state"
-version = "1.1.0"
-dependencies = [
- "decentralized-git-master-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "decentralized-git-state"
-version = "1.1.0"
-dependencies = [
- "decentralized-git-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "decentralized-git-user"
-version = "1.1.0"
-dependencies = [
- "decentralized-git-io",
- "decentralized-git-user-io",
- "gear-wasm-builder",
- "gstd",
-]
-
-[[package]]
-name = "decentralized-git-user-io"
-version = "1.1.0"
+name = "dashmap"
+version = "6.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
dependencies = [
- "gmeta",
- "gstd",
+ "cfg-if",
+ "crossbeam-utils",
+ "hashbrown 0.14.5",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core",
]
[[package]]
-name = "decentralized-git-user-state"
-version = "1.1.0"
-dependencies = [
- "decentralized-git-user-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
-]
+name = "defer"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "930c7171c8df9fb1782bdf9b918ed9ed2d33d1d22300abb754f9085bc48bf8e8"
[[package]]
name = "der"
@@ -1742,6 +1582,15 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]
+
[[package]]
name = "derivative"
version = "2.2.0"
@@ -1755,109 +1604,57 @@ dependencies = [
[[package]]
name = "derive-syn-parse"
-version = "0.1.5"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd"
+checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.89",
]
[[package]]
-name = "derive_more"
-version = "0.99.17"
+name = "derive-where"
+version = "1.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
+checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25"
dependencies = [
- "convert_case",
"proc-macro2",
"quote",
- "rustc_version",
- "syn 1.0.109",
-]
-
-[[package]]
-name = "dex"
-version = "1.1.0"
-dependencies = [
- "dex-factory",
- "dex-factory-io",
- "dex-factory-state",
- "dex-io",
- "dex-state",
- "gclient",
- "gear-core",
- "gear-lib",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "primitive-types",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
- "sp-core-hashing 10.0.0",
- "tokio",
-]
-
-[[package]]
-name = "dex-factory"
-version = "1.1.0"
-dependencies = [
- "dex-factory-io",
- "dex-io",
- "gear-wasm-builder",
- "gstd",
-]
-
-[[package]]
-name = "dex-factory-io"
-version = "1.1.0"
-dependencies = [
- "dex-io",
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "dex-factory-state"
-version = "1.1.0"
-dependencies = [
- "dex-factory-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
+ "syn 2.0.89",
]
[[package]]
-name = "dex-io"
-version = "1.1.0"
+name = "derive_more"
+version = "0.99.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
dependencies = [
- "gear-lib",
- "gmeta",
- "gstd",
- "primitive-types",
+ "convert_case 0.4.0",
+ "proc-macro2",
+ "quote",
+ "rustc_version",
+ "syn 2.0.89",
]
[[package]]
-name = "dex-state"
-version = "1.1.0"
+name = "derive_more"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05"
dependencies = [
- "dex-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "primitive-types",
+ "derive_more-impl",
]
[[package]]
-name = "digest"
-version = "0.8.1"
+name = "derive_more-impl"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
+checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
dependencies = [
- "generic-array 0.12.4",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
]
[[package]]
@@ -1866,7 +1663,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
- "generic-array 0.14.7",
+ "generic-array",
]
[[package]]
@@ -1882,19 +1679,20 @@ dependencies = [
]
[[package]]
-name = "dirs"
-version = "4.0.0"
+name = "dirs-next"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
+checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
dependencies = [
- "dirs-sys",
+ "cfg-if",
+ "dirs-sys-next",
]
[[package]]
-name = "dirs-sys"
-version = "0.3.7"
+name = "dirs-sys-next"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
"redox_users",
@@ -1902,47 +1700,55 @@ dependencies = [
]
[[package]]
-name = "downcast-rs"
-version = "1.2.1"
+name = "displaydoc"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
-
-[[package]]
-name = "dutch-auction"
-version = "1.1.0"
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
- "dutch-auction-io",
- "gclient",
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "non-fungible-token",
- "non-fungible-token-io",
- "primitive-types",
- "tokio",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
]
[[package]]
-name = "dutch-auction-io"
-version = "1.1.0"
+name = "docify"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a772b62b1837c8f060432ddcc10b17aae1453ef17617a99bc07789252d2a5896"
dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
+ "docify_macros",
]
[[package]]
-name = "dutch-auction-state"
-version = "1.1.0"
+name = "docify_macros"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60e6be249b0a462a14784a99b19bf35a667bb5e09de611738bb7362fa4c95ff7"
dependencies = [
- "dutch-auction-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
+ "common-path",
+ "derive-syn-parse",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "syn 2.0.89",
+ "termcolor",
+ "toml",
+ "walkdir",
]
+[[package]]
+name = "downcast"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1"
+
+[[package]]
+name = "downcast-rs"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
+
[[package]]
name = "dyn-clonable"
version = "0.9.0"
@@ -1974,40 +1780,34 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
name = "dynamic-nft"
version = "1.1.0"
dependencies = [
- "dynamic-nft-io",
+ "dynamic-nft",
+ "dynamic-nft-app",
+ "dynamic-nft-client",
"gclient",
- "gear-lib-derive",
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "hex-literal",
- "primitive-types",
- "sp-core 21.0.0",
- "sp-core-hashing 10.0.0",
+ "gear-core",
+ "sails-idl-gen",
+ "sails-rs",
"tokio",
]
[[package]]
-name = "dynamic-nft-io"
-version = "1.1.0"
+name = "dynamic-nft-app"
+version = "0.1.0"
dependencies = [
- "gear-lib-old",
- "gmeta",
"gstd",
- "primitive-types",
+ "sails-rs",
+ "vnft-service",
]
[[package]]
-name = "dynamic-nft-state"
-version = "1.1.0"
+name = "dynamic-nft-client"
+version = "0.1.0"
dependencies = [
- "dynamic-nft-io",
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
+ "dynamic-nft-app",
+ "mockall",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
@@ -2033,7 +1833,7 @@ checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9"
dependencies = [
"byteorder",
"dynasm",
- "memmap2",
+ "memmap2 0.5.10",
]
[[package]]
@@ -2046,50 +1846,55 @@ dependencies = [
"digest 0.10.7",
"elliptic-curve",
"rfc6979",
- "signature 2.2.0",
+ "serdect",
+ "signature",
"spki",
]
[[package]]
name = "ed25519"
-version = "1.5.3"
+version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
+checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
dependencies = [
- "signature 1.6.4",
+ "pkcs8",
+ "signature",
]
[[package]]
name = "ed25519-dalek"
-version = "1.0.1"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
+checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871"
dependencies = [
- "curve25519-dalek 3.2.0",
+ "curve25519-dalek",
"ed25519",
- "sha2 0.9.9",
+ "serde",
+ "sha2 0.10.8",
+ "subtle",
"zeroize",
]
[[package]]
name = "ed25519-zebra"
-version = "3.1.0"
+version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6"
+checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9"
dependencies = [
- "curve25519-dalek 3.2.0",
- "hashbrown 0.12.3",
+ "curve25519-dalek",
+ "ed25519",
+ "hashbrown 0.14.5",
"hex",
- "rand_core 0.6.4",
- "sha2 0.9.9",
+ "rand_core",
+ "sha2 0.10.8",
"zeroize",
]
[[package]]
name = "either"
-version = "1.11.0"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "elliptic-curve"
@@ -2101,15 +1906,25 @@ dependencies = [
"crypto-bigint",
"digest 0.10.7",
"ff",
- "generic-array 0.14.7",
+ "generic-array",
"group",
"pkcs8",
- "rand_core 0.6.4",
+ "rand_core",
"sec1",
+ "serdect",
"subtle",
"zeroize",
]
+[[package]]
+name = "ena"
+version = "0.14.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5"
+dependencies = [
+ "log",
+]
+
[[package]]
name = "enum-iterator"
version = "0.7.0"
@@ -2147,28 +1962,38 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "enumset"
-version = "1.1.3"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "226c0da7462c13fb57e5cc9e0dc8f0635e7d27f276a3a7fd30054647f669007d"
+checksum = "d07a4b049558765cef5f0c1a273c3fc57084d768b44d2f98127aef4cceb17293"
dependencies = [
"enumset_derive",
]
[[package]]
name = "enumset_derive"
-version = "0.8.1"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af"
+checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242"
dependencies = [
- "darling 0.20.8",
+ "darling 0.20.10",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "env_filter"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
+dependencies = [
+ "log",
+ "regex",
]
[[package]]
@@ -2184,6 +2009,19 @@ dependencies = [
"termcolor",
]
+[[package]]
+name = "env_logger"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "env_filter",
+ "humantime",
+ "log",
+]
+
[[package]]
name = "environmental"
version = "1.1.4"
@@ -2207,63 +2045,10 @@ dependencies = [
]
[[package]]
-name = "escrow"
-version = "1.1.0"
-dependencies = [
- "escrow-io",
- "gclient",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
- "tokio",
-]
-
-[[package]]
-name = "escrow-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "escrow-state"
-version = "1.1.0"
-dependencies = [
- "escrow-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "etc"
-version = "0.1.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b241177c7107d9829286c2ffdc5eee98d992d6356f3515e7f412f988b1a72fd"
-
-[[package]]
-name = "event-listener"
-version = "2.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
-
-[[package]]
-name = "event-listener"
-version = "3.1.0"
+name = "etc"
+version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2"
-dependencies = [
- "concurrent-queue",
- "parking",
- "pin-project-lite",
-]
+checksum = "1b241177c7107d9829286c2ffdc5eee98d992d6356f3515e7f412f988b1a72fd"
[[package]]
name = "event-listener"
@@ -2272,140 +2057,118 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e"
dependencies = [
"concurrent-queue",
- "parking",
"pin-project-lite",
]
[[package]]
name = "event-listener"
-version = "5.3.0"
+version = "5.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24"
+checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba"
dependencies = [
"concurrent-queue",
"parking",
"pin-project-lite",
]
-[[package]]
-name = "event-listener-strategy"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3"
-dependencies = [
- "event-listener 4.0.3",
- "pin-project-lite",
-]
-
[[package]]
name = "event-listener-strategy"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1"
dependencies = [
- "event-listener 5.3.0",
+ "event-listener 5.3.1",
"pin-project-lite",
]
[[package]]
name = "expander"
-version = "2.1.0"
+version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00e83c02035136f1592a47964ea60c05a50e4ed8b5892cfac197063850898d4d"
+checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2"
dependencies = [
"blake2",
+ "file-guard",
"fs-err",
- "prettier-please",
+ "prettyplease",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
-name = "fake-simd"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
-
-[[package]]
-name = "fallible-iterator"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
-
-[[package]]
-name = "fastrand"
-version = "1.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
+name = "extended-vft"
+version = "1.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
dependencies = [
- "instant",
+ "extended-vft-app",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
-name = "fastrand"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
-
-[[package]]
-name = "feeds"
-version = "1.1.0"
+name = "extended-vft-app"
+version = "0.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
dependencies = [
- "feeds-channel",
- "feeds-channel-io",
- "feeds-io",
- "gear-wasm-builder",
"gstd",
- "gtest",
+ "sails-rs",
+ "vft-service",
]
[[package]]
-name = "feeds-channel"
-version = "1.1.0"
+name = "extended-vft-client"
+version = "0.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
dependencies = [
- "async-trait",
- "feeds-channel-io",
- "feeds-io",
- "gear-wasm-builder",
- "gstd",
+ "extended-vft-app",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
-name = "feeds-channel-io"
+name = "extended-vmt"
version = "1.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
dependencies = [
- "gmeta",
- "gstd",
+ "extended-vmt-app",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
-name = "feeds-channel-state"
-version = "1.1.0"
+name = "extended-vmt-app"
+version = "0.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
dependencies = [
- "feeds-channel-io",
- "gear-wasm-builder",
- "gmeta",
"gstd",
+ "sails-rs",
+ "vmt-service",
]
[[package]]
-name = "feeds-io"
-version = "1.1.0"
+name = "extended-vmt-client"
+version = "0.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
dependencies = [
- "gmeta",
- "gstd",
+ "extended-vmt-app",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
-name = "feeds-state"
-version = "1.1.0"
-dependencies = [
- "feeds-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
-]
+name = "fallible-iterator"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
+
+[[package]]
+name = "fastrand"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4"
[[package]]
name = "ff"
@@ -2413,15 +2176,35 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
dependencies = [
- "rand_core 0.6.4",
+ "rand_core",
"subtle",
]
[[package]]
name = "fiat-crypto"
-version = "0.2.8"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
+
+[[package]]
+name = "file-guard"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "finito"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e"
+checksum = "2384245d85162258a14b43567a9ee3598f5ae746a1581fb5d3d2cb780f0dbf95"
+dependencies = [
+ "futures-timer",
+ "pin-project",
+]
[[package]]
name = "fixed-hash"
@@ -2430,17 +2213,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534"
dependencies = [
"byteorder",
- "rand 0.8.5",
+ "rand",
"rustc-hex",
"static_assertions",
]
+[[package]]
+name = "fixedbitset"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
+
[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+[[package]]
+name = "foldhash"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
+
[[package]]
name = "form_urlencoded"
version = "1.2.1"
@@ -2450,6 +2245,12 @@ dependencies = [
"percent-encoding",
]
+[[package]]
+name = "fragile"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
+
[[package]]
name = "frame-metadata"
version = "15.1.0"
@@ -2475,11 +2276,14 @@ dependencies = [
[[package]]
name = "frame-support"
-version = "22.0.0"
+version = "38.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12ab435a28c0b92be45e871a20faae7307a5f1153168aed11076892511b97332"
+checksum = "1e44af69fa61bc5005ffe0339e198957e77f0f255704a9bee720da18a733e3dc"
dependencies = [
+ "aquamarine",
+ "array-bytes",
"bitflags 1.3.2",
+ "docify",
"environmental",
"frame-metadata 16.0.0",
"frame-support-procedural",
@@ -2491,82 +2295,88 @@ dependencies = [
"paste",
"scale-info",
"serde",
+ "serde_json",
"smallvec",
"sp-api",
"sp-arithmetic",
- "sp-core 22.0.0",
- "sp-core-hashing-proc-macro",
- "sp-debug-derive 9.0.0",
+ "sp-core",
+ "sp-crypto-hashing-proc-macro",
+ "sp-debug-derive 14.0.0",
+ "sp-genesis-builder",
"sp-inherents",
"sp-io",
+ "sp-metadata-ir",
"sp-runtime",
"sp-staking",
"sp-state-machine",
- "sp-std 9.0.0",
- "sp-tracing 11.0.0",
+ "sp-std 14.0.0",
+ "sp-tracing 17.0.1",
"sp-weights",
+ "static_assertions",
"tt-call",
]
[[package]]
name = "frame-support-procedural"
-version = "17.0.0"
+version = "30.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3515d87fdbf82fa3e5a03b4318ee897c3b2adda928625146dd7d33d52bc2978"
+checksum = "5e8f9b6bc1517a6fcbf0b2377e5c8c6d39f5bb7862b191a59a9992081d63972d"
dependencies = [
"Inflector",
"cfg-expr",
"derive-syn-parse",
"expander",
"frame-support-procedural-tools",
- "itertools",
+ "itertools 0.11.0",
"macro_magic",
"proc-macro-warning",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "sp-crypto-hashing",
+ "syn 2.0.89",
]
[[package]]
name = "frame-support-procedural-tools"
-version = "6.0.0"
+version = "13.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "072beafb884cd1c046188c64d593cacb6860314f50478a3713438cc56bee42de"
+checksum = "bead15a320be1764cdd50458c4cfacb23e0cee65f64f500f8e34136a94c7eeca"
dependencies = [
"frame-support-procedural-tools-derive",
- "proc-macro-crate 1.3.1",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "frame-support-procedural-tools-derive"
-version = "7.0.0"
+version = "12.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c3562da4b7b8e24189036c58d459b260e10c8b7af2dd180b7869ae29bb66277"
+checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "frame-system"
-version = "22.0.0"
+version = "38.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c5104921b9e4e8ffee5251caf7d28defa4e97080554b0e57f93a72b1ec8b915"
+checksum = "e3c7fa02f8c305496d2ae52edaecdb9d165f11afa965e05686d7d7dd1ce93611"
dependencies = [
"cfg-if",
+ "docify",
"frame-support",
"log",
"parity-scale-codec",
"scale-info",
"serde",
- "sp-core 22.0.0",
+ "sp-core",
"sp-io",
"sp-runtime",
- "sp-std 9.0.0",
+ "sp-std 14.0.0",
"sp-version",
"sp-weights",
]
@@ -2581,32 +2391,13 @@ dependencies = [
]
[[package]]
-name = "fungible-token"
-version = "1.1.0"
-dependencies = [
- "fungible-token-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
-]
-
-[[package]]
-name = "fungible-token-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "fungible-token-state"
-version = "1.1.0"
+name = "fs4"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e871a4cfa68bb224863b53149d973df1ac8d1ed2fa1d1bfc37ac1bb65dd37207"
dependencies = [
- "fungible-token-io",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
+ "rustix 0.38.41",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2617,9 +2408,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
[[package]]
name = "futures"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"
+checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
dependencies = [
"futures-channel",
"futures-core",
@@ -2632,9 +2423,9 @@ dependencies = [
[[package]]
name = "futures-channel"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
+checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
dependencies = [
"futures-core",
"futures-sink",
@@ -2642,15 +2433,15 @@ dependencies = [
[[package]]
name = "futures-core"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-executor"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"
+checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
dependencies = [
"futures-core",
"futures-task",
@@ -2660,32 +2451,17 @@ dependencies = [
[[package]]
name = "futures-io"
-version = "0.3.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
-
-[[package]]
-name = "futures-lite"
-version = "1.13.0"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce"
-dependencies = [
- "fastrand 1.9.0",
- "futures-core",
- "futures-io",
- "memchr",
- "parking",
- "pin-project-lite",
- "waker-fn",
-]
+checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-lite"
-version = "2.3.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5"
+checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1"
dependencies = [
- "fastrand 2.1.0",
+ "fastrand",
"futures-core",
"futures-io",
"parking",
@@ -2694,26 +2470,26 @@ dependencies = [
[[package]]
name = "futures-macro"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
+checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "futures-sink"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
[[package]]
name = "futures-task"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
[[package]]
name = "futures-timer"
@@ -2723,9 +2499,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
[[package]]
name = "futures-util"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
dependencies = [
"futures-channel",
"futures-core",
@@ -2743,67 +2519,55 @@ dependencies = [
name = "galactic-express"
version = "1.1.0"
dependencies = [
- "galactic-express-io",
- "gear-lib",
+ "galactic-express-app",
"gear-wasm-builder",
- "gstd",
- "gtest",
- "num-traits",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
-name = "galactic-express-io"
+name = "galactic-express-app"
version = "1.1.0"
dependencies = [
- "gear-lib",
- "gmeta",
+ "galactic-express",
+ "gclient",
+ "gear-core",
"gstd",
- "parity-scale-codec",
- "scale-info",
+ "gtest",
+ "num-traits",
+ "sails-rs",
+ "tokio",
]
[[package]]
name = "galloc"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c9f5076d43a53129240a66818481b9878b6ac57ad880e79fd35a3fcef1c45f9"
+checksum = "054ac752d5a6977aeb15906601190df15f199c19e28dca05d9d3370f7d29aaa7"
dependencies = [
"gear-dlmalloc",
]
[[package]]
-name = "game-of-chance"
-version = "1.1.0"
-dependencies = [
- "game-of-chance-io",
- "gclient",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "primitive-types",
- "rand 0.8.5",
- "rand_xoshiro",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
- "sp-core-hashing 10.0.0",
- "tokio",
-]
-
-[[package]]
-name = "game-of-chance-io"
-version = "1.1.0"
+name = "gbuiltin-bls381"
+version = "1.3.0"
+source = "git+https://github.com/gear-tech/gear?tag=v1.3.0#d9cfd99562ab009fc3bd6a7f9290f0fa9ec10b9c"
dependencies = [
- "gmeta",
- "gstd",
+ "ark-bls12-381",
+ "ark-ec",
+ "ark-ff",
+ "ark-scale",
+ "ark-serialize",
+ "derive_more 0.99.18",
+ "parity-scale-codec",
]
[[package]]
name = "gclient"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5abb6a987d9a9896f0716b8e9cad9b7bd699cd5b04fdd0d5a533908dc944281e"
+checksum = "c06189eb6d8d0b0793e1581155dd77058f7b1e92b9656c07ae75a45ccc536cd1"
dependencies = [
"anyhow",
"async-trait",
@@ -2823,24 +2587,23 @@ dependencies = [
[[package]]
name = "gcore"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c272adfc55e4a4a8a41aee309f13f5c57a25194bad7c7cc5a0fb37d07f3547e"
+checksum = "0e2352c4c66bf1dccf1fdb1eda7fd50296ea7bd2d5776e53b1b597235b5956cd"
dependencies = [
"gear-core-errors",
"gear-stack-buffer",
"gprimitives",
"gsys",
- "parity-scale-codec",
]
[[package]]
name = "gear-common"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "103731a2c79da16b2cd6fccbdfb80a4da9ec809e41e2f22d26f6c2e1acba5ba7"
+checksum = "e19d3992ea70d535b795668becf1faaf96833fa3af37651ab44391b539e5fd60"
dependencies = [
- "derive_more",
+ "derive_more 0.99.18",
"enum-iterator 1.5.0",
"frame-support",
"frame-system",
@@ -2851,38 +2614,40 @@ dependencies = [
"log",
"primitive-types",
"sp-arithmetic",
- "sp-core 22.0.0",
+ "sp-core",
"sp-io",
"sp-runtime",
- "sp-std 9.0.0",
+ "sp-std 14.0.0",
]
[[package]]
name = "gear-common-codegen"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cf844e4632df1eb661ed2ada2d6514bbf385bf2e560d78e94437015d52f5066"
+checksum = "8e2b9ef984f2406f3059c0bcaa2f01443b9306ce29c5a0bdf65eca6144de6221"
dependencies = [
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "gear-core"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1e43021b90b559ae98879022985d3e5d9c47ef7b639d44cc0696b9f45d076a7"
+checksum = "350e1a3e960493cbb03dd41712a4fb6f6562bfb5ccc5a9b5c2cbda9cfb5b0996"
dependencies = [
"blake2",
"byteorder",
- "derive_more",
+ "derive_more 0.99.18",
"enum-iterator 1.5.0",
"gear-core-errors",
"gear-wasm-instrument",
"gprimitives",
"gsys",
+ "gwasm-instrument",
"hashbrown 0.14.5",
"hex",
+ "impl-serde",
"log",
"num-traits",
"numerated",
@@ -2896,13 +2661,13 @@ dependencies = [
[[package]]
name = "gear-core-backend"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f907e5d4374ce20cd5af5fefc1b5b84f515e6cfe8b3da11e1fd5aacd94faec35"
+checksum = "0c8f900afb391d3d6fb97f87760cc2bf35c2328ecd2bb4f47e55c6ec1cd34e6f"
dependencies = [
"actor-system-error",
"blake2",
- "derive_more",
+ "derive_more 0.99.18",
"gear-core",
"gear-core-errors",
"gear-lazy-pages-common",
@@ -2916,11 +2681,11 @@ dependencies = [
[[package]]
name = "gear-core-errors"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ea454c3f84f392c9c11b90e966d15e2dd037a91dd5abeaf3493f199c91b4012"
+checksum = "08f3dfc67e68c37592b4c69b42b02c1ce0d3f7acceb40795d40f1db83d137a07"
dependencies = [
- "derive_more",
+ "derive_more 0.99.18",
"enum-iterator 1.5.0",
"scale-info",
"serde",
@@ -2941,12 +2706,12 @@ dependencies = [
[[package]]
name = "gear-lazy-pages"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ba02ed1797a352a7a45755eff098ca8b535cf3044b7912643ac8b394e954f9b"
+checksum = "ab26171be4f5256be5c5e57f10245bbf4257b9afb46550aeab523e1c1d35404f"
dependencies = [
"cfg-if",
- "derive_more",
+ "derive_more 0.99.18",
"errno",
"gear-core",
"gear-lazy-pages-common",
@@ -2958,14 +2723,15 @@ dependencies = [
"numerated",
"region",
"sp-wasm-interface-common",
+ "wasmer-vm",
"winapi",
]
[[package]]
name = "gear-lazy-pages-common"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6efd5c33738804fd10514c57e71428b9d2ff4edee0591fbba2e9c5a7bbe9f004"
+checksum = "0295e7cb72c5ca370a6717a7fb427d0a23f51173730dff6e3579e33126f3c607"
dependencies = [
"gear-core",
"num_enum",
@@ -2974,51 +2740,25 @@ dependencies = [
[[package]]
name = "gear-lazy-pages-native-interface"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "571e65a1290e7b12a69f0af6f8e63b0c81c9e73737d4f3fbb3bfbf1c744160f9"
+checksum = "c74f444fe97a185322285614f83a870434cc0b12f63aa6e95d7d73ec5ca39f81"
dependencies = [
"gear-core",
"gear-lazy-pages",
"gear-lazy-pages-common",
"gear-wasm-instrument",
-]
-
-[[package]]
-name = "gear-lib"
-version = "1.1.0"
-dependencies = [
- "ahash 0.8.11",
- "gstd",
- "indexmap 2.2.6",
- "primitive-types",
-]
-
-[[package]]
-name = "gear-lib-derive"
-version = "1.1.0"
-dependencies = [
- "quote",
- "syn 2.0.72",
-]
-
-[[package]]
-name = "gear-lib-old"
-version = "1.1.0"
-dependencies = [
- "gstd",
- "primitive-types",
- "schnorrkel 0.10.2",
+ "log",
]
[[package]]
name = "gear-node-wrapper"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cb74b08a115081eb977fa2de8865a2ee911671af6888fa4090708d11487cfe9"
+checksum = "1dcf5c2b1ca4078f7270aee401dde128edfc2186481ef9aef23c39b9724ccbd7"
dependencies = [
"anyhow",
- "rand 0.8.5",
+ "rand",
"smallvec",
"which",
]
@@ -3027,111 +2767,105 @@ dependencies = [
name = "gear-pwasm-utils"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ea09901ce41f64d1be7369b8c2efc774e89b200ac434496ab24e6af96e68f97"
-dependencies = [
- "byteorder",
- "gear-wasm",
- "log",
-]
-
-[[package]]
-name = "gear-runtime-interface"
-version = "1.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4862e97c4a2ee9d93dacee1ed8aba7d5307b8a78bcf3e837b4cf7e19df556eac"
-dependencies = [
- "ark-bls12-381",
- "ark-ec",
- "ark-ff",
- "ark-scale",
- "byteorder",
- "gear-core",
- "gear-lazy-pages",
- "gear-lazy-pages-common",
- "gear-sandbox-host",
- "gp-runtime-interface",
- "gp-wasm-interface",
+checksum = "1ea09901ce41f64d1be7369b8c2efc774e89b200ac434496ab24e6af96e68f97"
+dependencies = [
+ "byteorder",
+ "gear-wasm",
"log",
- "parity-scale-codec",
- "sha2 0.10.8",
- "sp-io",
- "sp-std 9.0.0",
- "winapi",
]
[[package]]
name = "gear-sandbox"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66c6bfa8ed3e68b855f82f5b128c83fcaa75ba2d2fb30776ac9a2af5d94b600a"
+checksum = "67ee88ae4d7fb327f70f8f2cf0da1852fc15c2ac029316ea07d74cf027a93987"
dependencies = [
- "gear-runtime-interface",
"gear-sandbox-env",
- "gwasmi",
+ "gear-sandbox-interface",
+ "gear-wasmer-cache",
"log",
"parity-scale-codec",
- "sp-core 22.0.0",
- "sp-std 9.0.0",
+ "sp-core",
+ "sp-std 14.0.0",
"sp-wasm-interface-common",
+ "wasmer",
+ "wasmer-compiler",
+ "wasmer-types",
+ "wasmer-vm",
]
[[package]]
name = "gear-sandbox-env"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afc42420cd1428a2ea5d36dd167b6228e3a14d65678115a9f42be9005596c32f"
+checksum = "defe0949b7688387d05e6311e04ce9b521e9f0ceade9653c47c54518f3a21806"
dependencies = [
"parity-scale-codec",
- "sp-debug-derive 9.0.0",
- "sp-std 9.0.0",
+ "sp-debug-derive 14.0.0",
+ "sp-std 14.0.0",
"sp-wasm-interface-common",
]
[[package]]
name = "gear-sandbox-host"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12a668e124bd3c885f462ab7b4981fde4dca2de88f08763711c5922d11d04852"
+checksum = "7e248e2a95cfca94119afe8b65732b27f883836ff160106819c3b23a4499a7da"
dependencies = [
+ "atomic_enum",
+ "defer",
"environmental",
"gear-sandbox-env",
+ "gear-wasmer-cache",
"gp-allocator",
"log",
"parity-scale-codec",
+ "region",
"sp-wasm-interface-common",
"tempfile",
"thiserror",
- "uluru",
"wasmer",
- "wasmer-cache",
"wasmer-types",
- "wasmi 0.13.2",
+ "wasmi 0.38.0",
+]
+
+[[package]]
+name = "gear-sandbox-interface"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8886849429ebc34b7307a9dd6e211e166bdc697c8c3715a42f37c5eaf24a8ec"
+dependencies = [
+ "gear-sandbox-host",
+ "gp-runtime-interface",
+ "gp-wasm-interface",
+ "log",
+ "parity-scale-codec",
]
[[package]]
name = "gear-ss58"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a54d1199553745126a7a519d64e748b71b1927c2da54bb4758791d5e6131596"
+checksum = "e0d53b2c765f761e440a82c76d0b44c922cb68cfe207ae8e0d141af110794324"
dependencies = [
"blake2",
- "bs58 0.5.1",
+ "bs58",
"hex",
]
[[package]]
name = "gear-stack-buffer"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68a0f6dfda464d2293ae6808aee9245a194799db651f888076020c65c30a66ee"
+checksum = "432eedd0a6fc10057adfe7aed2d0e535f32930bc4762c324f8aedd9dc76a6329"
[[package]]
name = "gear-utils"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46c0cbc34768ea17ea9475dd1bcd921f51d661a8542f00174d5279bc0357107a"
+checksum = "8a934258a58173a0f163342048cf672fcc7290cfea0aedaaa7b9784e6201a69e"
dependencies = [
- "env_logger",
+ "env_logger 0.10.2",
"gear-core",
"hex",
"nonempty",
@@ -3149,48 +2883,91 @@ checksum = "bbfbfa701dc65e683fcd2fb24f046bcef22634acbdf47ad14724637dc39ad05b"
[[package]]
name = "gear-wasm-builder"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5c3b3bb4a9f3ac450826af22380b0b0876c47a2f74a6482676c2f96a1c8ac35"
+checksum = "3eb2d19a1fa2d12a5bef708647c16f106556a9b51a777f474952e894890f38ac"
dependencies = [
"anyhow",
"cargo_metadata",
+ "cargo_toml",
"chrono",
- "colored",
- "dirs",
"gear-core",
"gear-pwasm-utils",
"gear-wasm-instrument",
+ "gear-wasm-optimizer",
"gmeta",
+ "itertools 0.13.0",
"log",
- "once_cell",
"pathdiff",
"regex",
"rustc_version",
"thiserror",
"toml",
- "wasmparser-nostd",
- "which",
]
[[package]]
name = "gear-wasm-instrument"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c4916f703d66a1707b6da29baeefae7f4bd06b0a61f0af82b9a6ec8db0a9d48"
+checksum = "0a15f7b7a69232cab744992f6e2df747c1435a3a520aba65ed6f8d24c6d70600"
dependencies = [
- "derive_more",
+ "derive_more 0.99.18",
"enum-iterator 1.5.0",
"gwasm-instrument",
]
[[package]]
-name = "generic-array"
-version = "0.12.4"
+name = "gear-wasm-optimizer"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd"
+checksum = "801c8acfc34a1e6611f369992da7d5be4d9de71c7d040bf4a9d96f1d34c73d11"
dependencies = [
- "typenum",
+ "anyhow",
+ "colored",
+ "gear-pwasm-utils",
+ "gear-wasm-instrument",
+ "log",
+ "regex",
+ "rustc_version",
+ "wasmparser-nostd",
+ "which",
+]
+
+[[package]]
+name = "gear-wasmer-cache"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7c9af136dc9ccbbe148398bbd5a8f35a95b914592dc00f18b5d946b399e2aea"
+dependencies = [
+ "bytes",
+ "derive_more 0.99.18",
+ "fs4",
+ "log",
+ "uluru",
+ "wasmer",
+ "wasmer-cache",
+]
+
+[[package]]
+name = "genco"
+version = "0.17.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a35958104272e516c2a5f66a9d82fba4784d2b585fc1e2358b8f96e15d342995"
+dependencies = [
+ "genco-macros",
+ "relative-path",
+ "smallvec",
+]
+
+[[package]]
+name = "genco-macros"
+version = "0.17.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43eaff6bbc0b3a878361aced5ec6a2818ee7c541c5b33b5880dfa9a86c23e9e7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
]
[[package]]
@@ -3204,17 +2981,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "getrandom"
-version = "0.1.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
-dependencies = [
- "cfg-if",
- "libc",
- "wasi 0.9.0+wasi-snapshot-preview1",
-]
-
[[package]]
name = "getrandom"
version = "0.2.15"
@@ -3222,8 +2988,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
+ "js-sys",
"libc",
- "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasi",
+ "wasm-bindgen",
]
[[package]]
@@ -3232,17 +3000,8 @@ version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9"
dependencies = [
- "rand_core 0.6.4",
-]
-
-[[package]]
-name = "ghash"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
-dependencies = [
- "opaque-debug 0.3.1",
- "polyval",
+ "rand",
+ "rand_core",
]
[[package]]
@@ -3269,9 +3028,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.28.1"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
[[package]]
name = "glob"
@@ -3281,12 +3040,12 @@ checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
[[package]]
name = "gmeta"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82d4fbb3700df8abeed1753ca211be90d9ae7eba772dee1b097f2e6c0ac27871"
+checksum = "1dbffc440c3507ef36d1e004d82bba9353184615f7d5c523956c514529a0f275"
dependencies = [
"blake2",
- "derive_more",
+ "derive_more 0.99.18",
"gmeta-codegen",
"hex",
"scale-info",
@@ -3294,13 +3053,13 @@ dependencies = [
[[package]]
name = "gmeta-codegen"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54280c1b89114b9b6490246e1df64dcb4d8bd1a8fabb3885e954677a439f9179"
+checksum = "99809eefdca29c9cd0bba3d0f1315d8653f24d98b539292408b50a00aa87ec75"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
@@ -3344,7 +3103,7 @@ dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
@@ -3365,16 +3124,17 @@ dependencies = [
[[package]]
name = "gprimitives"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be08df9284de8c1947d32da6f752c788f178be46f066386c36a204540cf24eb7"
+checksum = "e0c5e619456119c3dfc3e17e7df4be17bb100ffcd4f1af794e91b3d5bd2b7910"
dependencies = [
- "derive_more",
+ "derive_more 0.99.18",
"gear-ss58",
"hex",
"parity-scale-codec",
"primitive-types",
"scale-info",
+ "serde",
]
[[package]]
@@ -3384,15 +3144,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
dependencies = [
"ff",
- "rand_core 0.6.4",
+ "rand_core",
"subtle",
]
[[package]]
name = "gsdk"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e19a8a4381d9a7d37f679edd51bd990415ded91fc7568ec2a539dd20d69dcaf"
+checksum = "7af3ae2ca3840a516c4689a6ffb092323a39fc67337b4fe5b15cb1c7028d2254"
dependencies = [
"anyhow",
"base64 0.21.7",
@@ -3404,17 +3164,17 @@ dependencies = [
"gear-utils",
"gsdk-codegen",
"hex",
- "indexmap 2.2.6",
- "jsonrpsee 0.16.3",
+ "indexmap 2.6.0",
+ "jsonrpsee 0.24.7",
"log",
"parity-scale-codec",
"parking_lot",
- "rand 0.8.5",
+ "rand",
"scale-decode",
"scale-value",
"serde",
"serde_json",
- "sp-core 22.0.0",
+ "sp-core",
"sp-runtime",
"subxt",
"thiserror",
@@ -3422,22 +3182,22 @@ dependencies = [
[[package]]
name = "gsdk-codegen"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af39fef52eee02b0b96c0fc8a8e6630be2a3af2edb79c77420631705ff7cbf8f"
+checksum = "020e0d5b076b02d6997e759ea3761e3093d575d007a56a701268bbc2f3891efa"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "gstd"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c58b77baf767e90f5d11dc42cf1be867ff9a33e6c555b5184505e306b66eb79"
+checksum = "fed325705c0ecdba7219400e97cfa429e60e3ac50014d11ef0d8e68e21077b87"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"const_format",
"futures",
"galloc",
@@ -3448,37 +3208,38 @@ dependencies = [
"hex",
"parity-scale-codec",
"scale-info",
+ "waker-fn",
]
[[package]]
name = "gstd-codegen"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2820ff3e8a5ea3e676374928587723a2b90162200351bac704123a1bb2e692bd"
+checksum = "3450eaa3c97be08062e85694ddcc7eb0d3195275f51cd15c1704436046e331bd"
dependencies = [
"gprimitives",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "gsys"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cea2fa86657d54507ee30862d8f5249c1f2f7bb3ccd5ce3b19a34982fd7fa42"
+checksum = "179a3fecd2b741071b14f5aa3d4812e8ce1fce97b5de226d495bf13bf658a80c"
[[package]]
name = "gtest"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c0d524f69a40d609c854afcae42213c432bc05218df1b353114a34201e51737"
+checksum = "623750974ccb159c568be38900d19b06c81a59963f31e7aa8d088d3e66fb507f"
dependencies = [
"cargo_toml",
"colored",
"core-processor",
- "derive_more",
- "env_logger",
+ "derive_more 0.99.18",
+ "env_logger 0.10.2",
"etc",
"gear-common",
"gear-core",
@@ -3490,11 +3251,11 @@ dependencies = [
"gear-wasm-instrument",
"gsys",
"hex",
- "indexmap 2.2.6",
+ "indexmap 2.6.0",
"log",
"parity-scale-codec",
"path-clean",
- "rand 0.8.5",
+ "rand",
]
[[package]]
@@ -3507,51 +3268,57 @@ dependencies = [
]
[[package]]
-name = "gwasmi"
-version = "0.30.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "540bef71ad072d770140dc3f47f6bcc2b2b0492aa6a3ff236a13a7cd9427c58b"
-dependencies = [
- "gwasmi_core",
- "intx",
- "smallvec",
- "spin",
- "wasmi_arena",
- "wasmparser-nostd",
-]
-
-[[package]]
-name = "gwasmi_core"
-version = "0.12.0"
+name = "h2"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47443d9a0eaa456c80525cebb42178fc47690fee77f9729eeece6ff70906fdcf"
+checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
dependencies = [
- "downcast-rs",
- "libm",
- "num-traits",
- "paste",
- "region",
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http 0.2.12",
+ "indexmap 2.6.0",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
]
[[package]]
name = "h2"
-version = "0.3.26"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
+checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e"
dependencies = [
+ "atomic-waker",
"bytes",
"fnv",
"futures-core",
"futures-sink",
- "futures-util",
- "http",
- "indexmap 2.2.6",
+ "http 1.1.0",
+ "indexmap 2.6.0",
"slab",
"tokio",
"tokio-util",
"tracing",
]
+[[package]]
+name = "handlebars"
+version = "4.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225"
+dependencies = [
+ "log",
+ "pest",
+ "pest_derive",
+ "serde",
+ "serde_json",
+ "thiserror",
+]
+
[[package]]
name = "hash-db"
version = "0.16.0"
@@ -3567,15 +3334,6 @@ dependencies = [
"crunchy",
]
-[[package]]
-name = "hashbrown"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
-dependencies = [
- "ahash 0.7.8",
-]
-
[[package]]
name = "hashbrown"
version = "0.12.3"
@@ -3605,11 +3363,22 @@ dependencies = [
"serde",
]
+[[package]]
+name = "hashbrown"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash",
+]
+
[[package]]
name = "heck"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
@@ -3617,6 +3386,12 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
+[[package]]
+name = "hermit-abi"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
+
[[package]]
name = "hex"
version = "0.4.3"
@@ -3624,28 +3399,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
-name = "hex-literal"
-version = "0.4.1"
+name = "hex-conservative"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
+checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20"
[[package]]
-name = "hmac"
-version = "0.8.1"
+name = "hex-literal"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
-dependencies = [
- "crypto-mac 0.8.0",
- "digest 0.9.0",
-]
+checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0"
[[package]]
name = "hmac"
-version = "0.11.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
+checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
dependencies = [
- "crypto-mac 0.11.1",
+ "crypto-mac",
"digest 0.9.0",
]
@@ -3665,7 +3436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1"
dependencies = [
"digest 0.9.0",
- "generic-array 0.14.7",
+ "generic-array",
"hmac 0.8.1",
]
@@ -3679,65 +3450,66 @@ dependencies = [
]
[[package]]
-name = "horse-races"
-version = "1.1.0"
+name = "http"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1"
dependencies = [
- "fungible-token",
- "fungible-token-io",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "horse-races-io",
- "horse-races-state",
- "oracle-randomness",
- "oracle-randomness-io",
+ "bytes",
+ "fnv",
+ "itoa",
]
[[package]]
-name = "horse-races-io"
+name = "http"
version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
dependencies = [
- "gmeta",
- "gstd",
+ "bytes",
+ "fnv",
+ "itoa",
]
[[package]]
-name = "horse-races-state"
-version = "1.1.0"
+name = "http-body"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "horse-races-io",
+ "bytes",
+ "http 0.2.12",
+ "pin-project-lite",
]
[[package]]
-name = "http"
-version = "0.2.12"
+name = "http-body"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1"
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
dependencies = [
"bytes",
- "fnv",
- "itoa",
+ "http 1.1.0",
]
[[package]]
-name = "http-body"
-version = "0.4.6"
+name = "http-body-util"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
+checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
dependencies = [
"bytes",
- "http",
+ "futures-util",
+ "http 1.1.0",
+ "http-body 1.0.1",
"pin-project-lite",
]
[[package]]
name = "httparse"
-version = "1.8.0"
+version = "1.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
+checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"
[[package]]
name = "httpdate"
@@ -3753,25 +3525,45 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.28"
+version = "0.14.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2 0.3.26",
+ "http 0.2.12",
+ "http-body 0.4.6",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "hyper"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"
+checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f"
dependencies = [
"bytes",
"futures-channel",
- "futures-core",
"futures-util",
- "h2",
- "http",
- "http-body",
+ "h2 0.4.7",
+ "http 1.1.0",
+ "http-body 1.0.1",
"httparse",
- "httpdate",
"itoa",
"pin-project-lite",
- "socket2 0.5.7",
+ "smallvec",
"tokio",
- "tower-service",
- "tracing",
"want",
]
@@ -3782,21 +3574,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [
"futures-util",
- "http",
- "hyper",
+ "http 0.2.12",
+ "hyper 0.14.31",
"log",
- "rustls",
- "rustls-native-certs",
+ "rustls 0.21.12",
+ "rustls-native-certs 0.6.3",
"tokio",
- "tokio-rustls",
- "webpki-roots",
+ "tokio-rustls 0.24.1",
+]
+
+[[package]]
+name = "hyper-rustls"
+version = "0.27.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333"
+dependencies = [
+ "futures-util",
+ "http 1.1.0",
+ "hyper 1.5.1",
+ "hyper-util",
+ "log",
+ "rustls 0.23.19",
+ "rustls-pki-types",
+ "tokio",
+ "tokio-rustls 0.26.0",
+ "tower-service",
+]
+
+[[package]]
+name = "hyper-util"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http 1.1.0",
+ "http-body 1.0.1",
+ "hyper 1.5.1",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
]
[[package]]
name = "iana-time-zone"
-version = "0.1.60"
+version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
@@ -3816,51 +3644,148 @@ dependencies = [
]
[[package]]
-name = "ident_case"
-version = "1.0.1"
+name = "icu_collections"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
[[package]]
-name = "identity"
-version = "1.1.0"
+name = "icu_locid"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
dependencies = [
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "hex-literal",
- "identity-io",
- "identity-state",
- "sha2 0.10.8",
- "sp-core 21.0.0",
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
]
[[package]]
-name = "identity-io"
-version = "1.1.0"
+name = "icu_locid_transform"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
dependencies = [
- "gmeta",
- "gstd",
+ "displaydoc",
+ "icu_locid",
+ "icu_locid_transform_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
]
[[package]]
-name = "identity-state"
-version = "1.1.0"
+name = "icu_locid_transform_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
+
+[[package]]
+name = "icu_normalizer"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "identity-io",
+ "displaydoc",
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "utf16_iter",
+ "utf8_iter",
+ "write16",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
+
+[[package]]
+name = "icu_properties"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_locid_transform",
+ "icu_properties_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
+
+[[package]]
+name = "icu_provider"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
+dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_provider_macros",
+ "stable_deref_trait",
+ "tinystr",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_provider_macros"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
]
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
[[package]]
name = "idna"
-version = "0.5.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
+checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
dependencies = [
- "unicode-bidi",
- "unicode-normalization",
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
+]
+
+[[package]]
+name = "idna_adapter"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
]
[[package]]
@@ -3883,13 +3808,32 @@ dependencies = [
[[package]]
name = "impl-trait-for-tuples"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb"
+checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "include_dir"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd"
+dependencies = [
+ "include_dir_macros",
+]
+
+[[package]]
+name = "include_dir_macros"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
]
[[package]]
@@ -3905,12 +3849,12 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.2.6"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
+checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
dependencies = [
"equivalent",
- "hashbrown 0.14.5",
+ "hashbrown 0.15.2",
]
[[package]]
@@ -3925,14 +3869,14 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
dependencies = [
- "generic-array 0.14.7",
+ "generic-array",
]
[[package]]
name = "instant"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
dependencies = [
"cfg-if",
]
@@ -3946,34 +3890,34 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "intx"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75"
-
[[package]]
name = "io-lifetimes"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
dependencies = [
- "hermit-abi",
+ "hermit-abi 0.3.9",
"libc",
"windows-sys 0.48.0",
]
[[package]]
name = "is-terminal"
-version = "0.4.12"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
+checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
dependencies = [
- "hermit-abi",
+ "hermit-abi 0.4.0",
"libc",
"windows-sys 0.52.0",
]
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
[[package]]
name = "itertools"
version = "0.10.5"
@@ -3983,81 +3927,165 @@ dependencies = [
"either",
]
+[[package]]
+name = "itertools"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itertools"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itertools"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
-version = "1.0.11"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+
+[[package]]
+name = "jni"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec"
+dependencies = [
+ "cesu8",
+ "combine",
+ "jni-sys",
+ "log",
+ "thiserror",
+ "walkdir",
+]
+
+[[package]]
+name = "jni-sys"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
[[package]]
name = "js-sys"
-version = "0.3.69"
+version = "0.3.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
+checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "jsonrpsee"
-version = "0.16.3"
+version = "0.22.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b"
+checksum = "cfdb12a2381ea5b2e68c3469ec604a007b367778cdb14d09612c8069ebd616ad"
dependencies = [
- "jsonrpsee-core 0.16.3",
- "jsonrpsee-http-client 0.16.3",
- "jsonrpsee-types 0.16.3",
- "jsonrpsee-ws-client",
+ "jsonrpsee-client-transport 0.22.5",
+ "jsonrpsee-core 0.22.5",
+ "jsonrpsee-http-client 0.22.5",
+ "jsonrpsee-types 0.22.5",
]
[[package]]
name = "jsonrpsee"
-version = "0.20.3"
+version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc"
+checksum = "62b089779ad7f80768693755a031cc14a7766aba707cbe886674e3f79e9b7e47"
dependencies = [
- "jsonrpsee-client-transport 0.20.3",
- "jsonrpsee-core 0.20.3",
- "jsonrpsee-http-client 0.20.3",
- "jsonrpsee-types 0.20.3",
+ "jsonrpsee-core 0.23.2",
+ "jsonrpsee-types 0.23.2",
+ "jsonrpsee-ws-client 0.23.2",
+]
+
+[[package]]
+name = "jsonrpsee"
+version = "0.24.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c5c71d8c1a731cc4227c2f698d377e7848ca12c8a48866fc5e6951c43a4db843"
+dependencies = [
+ "jsonrpsee-core 0.24.7",
+ "jsonrpsee-http-client 0.24.7",
+ "jsonrpsee-types 0.24.7",
+ "jsonrpsee-ws-client 0.24.7",
]
[[package]]
name = "jsonrpsee-client-transport"
-version = "0.16.3"
+version = "0.22.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a"
+checksum = "4978087a58c3ab02efc5b07c5e5e2803024536106fd5506f558db172c889b3aa"
dependencies = [
"futures-util",
- "http",
- "jsonrpsee-core 0.16.3",
- "jsonrpsee-types 0.16.3",
+ "http 0.2.12",
+ "jsonrpsee-core 0.22.5",
"pin-project",
- "rustls-native-certs",
- "soketto",
+ "rustls-native-certs 0.7.3",
+ "rustls-pki-types",
+ "soketto 0.7.1",
"thiserror",
"tokio",
- "tokio-rustls",
+ "tokio-rustls 0.25.0",
"tokio-util",
"tracing",
- "webpki-roots",
+ "url",
+]
+
+[[package]]
+name = "jsonrpsee-client-transport"
+version = "0.23.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08163edd8bcc466c33d79e10f695cdc98c00d1e6ddfb95cec41b6b0279dd5432"
+dependencies = [
+ "base64 0.22.1",
+ "futures-util",
+ "http 1.1.0",
+ "jsonrpsee-core 0.23.2",
+ "pin-project",
+ "rustls 0.23.19",
+ "rustls-pki-types",
+ "rustls-platform-verifier",
+ "soketto 0.8.0",
+ "thiserror",
+ "tokio",
+ "tokio-rustls 0.26.0",
+ "tokio-util",
+ "tracing",
+ "url",
]
[[package]]
name = "jsonrpsee-client-transport"
-version = "0.20.3"
+version = "0.24.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935"
+checksum = "548125b159ba1314104f5bb5f38519e03a41862786aa3925cf349aae9cdd546e"
dependencies = [
+ "base64 0.22.1",
"futures-util",
- "http",
- "jsonrpsee-core 0.20.3",
+ "http 1.1.0",
+ "jsonrpsee-core 0.24.7",
"pin-project",
- "rustls-native-certs",
- "soketto",
+ "rustls 0.23.19",
+ "rustls-pki-types",
+ "rustls-platform-verifier",
+ "soketto 0.8.0",
"thiserror",
"tokio",
- "tokio-rustls",
+ "tokio-rustls 0.26.0",
"tokio-util",
"tracing",
"url",
@@ -4065,79 +4093,109 @@ dependencies = [
[[package]]
name = "jsonrpsee-core"
-version = "0.16.3"
+version = "0.22.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803"
+checksum = "b4b257e1ec385e07b0255dde0b933f948b5c8b8c28d42afda9587c3a967b896d"
dependencies = [
"anyhow",
- "async-lock 2.8.0",
"async-trait",
"beef",
- "futures-channel",
"futures-timer",
"futures-util",
- "hyper",
- "jsonrpsee-types 0.16.3",
- "rustc-hash",
+ "hyper 0.14.31",
+ "jsonrpsee-types 0.22.5",
+ "pin-project",
+ "rustc-hash 1.1.0",
"serde",
"serde_json",
"thiserror",
"tokio",
+ "tokio-stream",
"tracing",
]
[[package]]
name = "jsonrpsee-core"
-version = "0.20.3"
+version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b"
+checksum = "79712302e737d23ca0daa178e752c9334846b08321d439fd89af9a384f8c830b"
dependencies = [
"anyhow",
- "async-lock 2.8.0",
"async-trait",
"beef",
"futures-timer",
"futures-util",
- "hyper",
- "jsonrpsee-types 0.20.3",
- "rustc-hash",
+ "jsonrpsee-types 0.23.2",
+ "pin-project",
+ "rustc-hash 1.1.0",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tracing",
+]
+
+[[package]]
+name = "jsonrpsee-core"
+version = "0.24.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2882f6f8acb9fdaec7cefc4fd607119a9bd709831df7d7672a1d3b644628280"
+dependencies = [
+ "async-trait",
+ "bytes",
+ "futures-timer",
+ "futures-util",
+ "http 1.1.0",
+ "http-body 1.0.1",
+ "http-body-util",
+ "jsonrpsee-types 0.24.7",
+ "pin-project",
+ "rustc-hash 2.0.0",
"serde",
"serde_json",
"thiserror",
"tokio",
+ "tokio-stream",
"tracing",
]
[[package]]
name = "jsonrpsee-http-client"
-version = "0.16.3"
+version = "0.22.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43"
+checksum = "1ccf93fc4a0bfe05d851d37d7c32b7f370fe94336b52a2f0efc5f1981895c2e5"
dependencies = [
"async-trait",
- "hyper",
- "hyper-rustls",
- "jsonrpsee-core 0.16.3",
- "jsonrpsee-types 0.16.3",
- "rustc-hash",
+ "hyper 0.14.31",
+ "hyper-rustls 0.24.2",
+ "jsonrpsee-core 0.22.5",
+ "jsonrpsee-types 0.22.5",
"serde",
"serde_json",
"thiserror",
"tokio",
+ "tower",
"tracing",
+ "url",
]
[[package]]
name = "jsonrpsee-http-client"
-version = "0.20.3"
+version = "0.24.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20"
+checksum = "b3638bc4617f96675973253b3a45006933bde93c2fd8a6170b33c777cc389e5b"
dependencies = [
"async-trait",
- "hyper",
- "hyper-rustls",
- "jsonrpsee-core 0.20.3",
- "jsonrpsee-types 0.20.3",
+ "base64 0.22.1",
+ "http-body 1.0.1",
+ "hyper 1.5.1",
+ "hyper-rustls 0.27.3",
+ "hyper-util",
+ "jsonrpsee-core 0.24.7",
+ "jsonrpsee-types 0.24.7",
+ "rustls 0.23.19",
+ "rustls-platform-verifier",
"serde",
"serde_json",
"thiserror",
@@ -4149,71 +4207,126 @@ dependencies = [
[[package]]
name = "jsonrpsee-types"
-version = "0.16.3"
+version = "0.22.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5"
+checksum = "150d6168405890a7a3231a3c74843f58b8959471f6df76078db2619ddee1d07d"
dependencies = [
"anyhow",
"beef",
"serde",
"serde_json",
"thiserror",
- "tracing",
]
[[package]]
name = "jsonrpsee-types"
-version = "0.20.3"
+version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9"
+checksum = "d9c465fbe385238e861fdc4d1c85e04ada6c1fd246161d26385c1b311724d2af"
dependencies = [
- "anyhow",
"beef",
+ "http 1.1.0",
+ "serde",
+ "serde_json",
+ "thiserror",
+]
+
+[[package]]
+name = "jsonrpsee-types"
+version = "0.24.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a178c60086f24cc35bb82f57c651d0d25d99c4742b4d335de04e97fa1f08a8a1"
+dependencies = [
+ "http 1.1.0",
"serde",
"serde_json",
"thiserror",
- "tracing",
]
[[package]]
name = "jsonrpsee-ws-client"
-version = "0.16.3"
+version = "0.23.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c28759775f5cb2f1ea9667672d3fe2b0e701d1f4b7b67954e60afe7fd058b5e"
+dependencies = [
+ "http 1.1.0",
+ "jsonrpsee-client-transport 0.23.2",
+ "jsonrpsee-core 0.23.2",
+ "jsonrpsee-types 0.23.2",
+ "url",
+]
+
+[[package]]
+name = "jsonrpsee-ws-client"
+version = "0.24.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e"
+checksum = "0fe322e0896d0955a3ebdd5bf813571c53fea29edd713bc315b76620b327e86d"
dependencies = [
- "http",
- "jsonrpsee-client-transport 0.16.3",
- "jsonrpsee-core 0.16.3",
- "jsonrpsee-types 0.16.3",
+ "http 1.1.0",
+ "jsonrpsee-client-transport 0.24.7",
+ "jsonrpsee-core 0.24.7",
+ "jsonrpsee-types 0.24.7",
+ "url",
]
[[package]]
name = "k256"
-version = "0.13.3"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b"
+checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b"
dependencies = [
"cfg-if",
"ecdsa",
"elliptic-curve",
"once_cell",
+ "serdect",
"sha2 0.10.8",
]
[[package]]
-name = "keccak"
-version = "0.1.5"
+name = "keccak"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654"
+dependencies = [
+ "cpufeatures",
+]
+
+[[package]]
+name = "lalrpop"
+version = "0.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca"
+dependencies = [
+ "ascii-canvas",
+ "bit-set",
+ "ena",
+ "itertools 0.11.0",
+ "lalrpop-util",
+ "petgraph",
+ "regex",
+ "regex-syntax 0.8.5",
+ "string_cache",
+ "term",
+ "tiny-keccak",
+ "unicode-xid",
+ "walkdir",
+]
+
+[[package]]
+name = "lalrpop-util"
+version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654"
+checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553"
dependencies = [
- "cpufeatures",
+ "regex-automata 0.4.9",
]
[[package]]
name = "lazy_static"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "leb128"
@@ -4223,9 +4336,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]]
name = "libc"
-version = "0.2.154"
+version = "0.2.166"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346"
+checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36"
[[package]]
name = "libc-print"
@@ -4236,21 +4349,11 @@ dependencies = [
"libc",
]
-[[package]]
-name = "libloading"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
-dependencies = [
- "cfg-if",
- "winapi",
-]
-
[[package]]
name = "libm"
-version = "0.2.8"
+version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
+checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
[[package]]
name = "libredox"
@@ -4258,7 +4361,7 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [
- "bitflags 2.5.0",
+ "bitflags 2.6.0",
"libc",
]
@@ -4275,7 +4378,7 @@ dependencies = [
"libsecp256k1-core",
"libsecp256k1-gen-ecmult",
"libsecp256k1-gen-genmult",
- "rand 0.8.5",
+ "rand",
"serde",
"sha2 0.9.9",
"typenum",
@@ -4318,15 +4421,15 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]]
name = "linux-raw-sys"
-version = "0.3.8"
+version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
+checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
-name = "linux-raw-sys"
-version = "0.4.13"
+name = "litemap"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
+checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
[[package]]
name = "lock_api"
@@ -4340,36 +4443,50 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.21"
+version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
-name = "loupe"
-version = "0.1.3"
+name = "logos"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d"
+checksum = "c000ca4d908ff18ac99b93a062cb8958d331c3220719c52e77cb19cc6ac5d2c1"
dependencies = [
- "indexmap 1.9.3",
- "loupe-derive",
- "rustversion",
+ "logos-derive",
]
[[package]]
-name = "loupe-derive"
-version = "0.1.3"
+name = "logos-codegen"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952"
+checksum = "dc487311295e0002e452025d6b580b77bb17286de87b57138f3b5db711cded68"
dependencies = [
+ "beef",
+ "fnv",
+ "proc-macro2",
"quote",
- "syn 1.0.109",
+ "regex-syntax 0.6.29",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "logos-derive"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dbfc0d229f1f42d790440136d941afd806bc9e949e2bcb8faa813b0f00d1267e"
+dependencies = [
+ "logos-codegen",
]
[[package]]
name = "lru"
-version = "0.10.1"
+version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670"
+checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
+dependencies = [
+ "hashbrown 0.15.2",
+]
[[package]]
name = "mach"
@@ -4391,50 +4508,50 @@ dependencies = [
[[package]]
name = "macro_magic"
-version = "0.4.2"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9"
+checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d"
dependencies = [
"macro_magic_core",
"macro_magic_macros",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "macro_magic_core"
-version = "0.4.2"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00"
+checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150"
dependencies = [
"const-random",
"derive-syn-parse",
"macro_magic_core_macros",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "macro_magic_core_macros"
-version = "0.4.3"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac"
+checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "macro_magic_macros"
-version = "0.4.2"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a"
+checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869"
dependencies = [
"macro_magic_core",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
@@ -4446,11 +4563,20 @@ dependencies = [
"regex-automata 0.1.10",
]
+[[package]]
+name = "matchers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+dependencies = [
+ "regex-automata 0.1.10",
+]
+
[[package]]
name = "memchr"
-version = "2.7.2"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "memfd"
@@ -4458,7 +4584,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64"
dependencies = [
- "rustix 0.38.34",
+ "rustix 0.38.41",
]
[[package]]
@@ -4471,12 +4597,12 @@ dependencies = [
]
[[package]]
-name = "memoffset"
-version = "0.6.5"
+name = "memmap2"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
+checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872"
dependencies = [
- "autocfg",
+ "libc",
]
[[package]]
@@ -4497,6 +4623,15 @@ dependencies = [
"autocfg",
]
+[[package]]
+name = "memoffset"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
+dependencies = [
+ "autocfg",
+]
+
[[package]]
name = "memory-db"
version = "0.32.0"
@@ -4512,18 +4647,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"
-[[package]]
-name = "merlin"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42"
-dependencies = [
- "byteorder",
- "keccak",
- "rand_core 0.5.1",
- "zeroize",
-]
-
[[package]]
name = "merlin"
version = "3.0.0"
@@ -4532,7 +4655,7 @@ checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d"
dependencies = [
"byteorder",
"keccak",
- "rand_core 0.6.4",
+ "rand_core",
"zeroize",
]
@@ -4544,215 +4667,100 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.7.2"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"
+checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
dependencies = [
- "adler",
+ "adler2",
]
[[package]]
name = "mio"
-version = "0.8.11"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
+checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [
+ "hermit-abi 0.3.9",
"libc",
- "wasi 0.11.0+wasi-snapshot-preview1",
- "windows-sys 0.48.0",
+ "wasi",
+ "windows-sys 0.52.0",
]
[[package]]
-name = "more-asserts"
-version = "0.2.2"
+name = "mockall"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389"
-
-[[package]]
-name = "multi-token"
-version = "1.1.0"
-dependencies = [
- "gclient",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "multi-token-io",
- "tokio",
-]
-
-[[package]]
-name = "multi-token-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "multisig-wallet"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "multisig-wallet-io",
- "primitive-types",
-]
-
-[[package]]
-name = "multisig-wallet-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "multisig-wallet-state"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "multisig-wallet-io",
-]
-
-[[package]]
-name = "nft"
-version = "1.1.0"
-dependencies = [
- "gclient",
- "gear-core",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "nft-io",
- "sp-core 21.0.0",
- "tokio",
-]
-
-[[package]]
-name = "nft-io"
-version = "1.1.0"
+checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48"
dependencies = [
- "gear-lib-old",
- "gmeta",
- "gstd",
- "parity-scale-codec",
- "primitive-types",
- "scale-info",
+ "cfg-if",
+ "downcast",
+ "fragile",
+ "lazy_static",
+ "mockall_derive",
+ "predicates",
+ "predicates-tree",
]
[[package]]
-name = "nft-marketplace"
-version = "1.1.0"
+name = "mockall_derive"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2"
dependencies = [
- "async-trait",
- "blake2-rfc",
- "gclient",
- "gear-lib-old",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "nft-marketplace-io",
- "non-fungible-token",
- "non-fungible-token-io",
- "primitive-types",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
- "tokio",
+ "cfg-if",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
]
[[package]]
-name = "nft-marketplace-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
-]
+name = "more-asserts"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389"
[[package]]
-name = "nft-marketplace-state"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "nft-marketplace-io",
-]
+name = "multi-stash"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "685a9ac4b61f4e728e1d2c6a7844609c16527aeb5e6c865915c08e619c16410f"
[[package]]
-name = "nft-master"
+name = "multisig-wallet"
version = "1.1.0"
dependencies = [
- "gclient",
- "gear-wasm-builder",
- "gstd",
"gtest",
- "nft-master-io",
+ "multisig-wallet",
+ "multisig-wallet-app",
+ "multisig-wallet-client",
+ "sails-idl-gen",
+ "sails-rs",
"tokio",
]
[[package]]
-name = "nft-master-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "nft-master-state"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "nft-master-io",
-]
-
-[[package]]
-name = "nft-pixelboard"
+name = "multisig-wallet-app"
version = "1.1.0"
dependencies = [
- "gear-lib-old",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "nft-pixelboard-io",
- "non-fungible-token",
- "non-fungible-token-io",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
+ "sails-rs",
]
[[package]]
-name = "nft-pixelboard-io"
+name = "multisig-wallet-client"
version = "1.1.0"
dependencies = [
- "gear-lib-old",
- "gmeta",
- "gstd",
+ "mockall",
+ "multisig-wallet-app",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
-name = "nft-pixelboard-state"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "nft-pixelboard-io",
-]
+name = "new_debug_unreachable"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
[[package]]
name = "nix"
@@ -4789,50 +4797,10 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
-dependencies = [
- "memchr",
- "minimal-lexical",
-]
-
-[[package]]
-name = "non-fungible-token"
-version = "1.1.0"
-dependencies = [
- "gclient",
- "gear-lib-derive",
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "hex-literal",
- "non-fungible-token-io",
- "primitive-types",
- "sp-core 21.0.0",
- "sp-core-hashing 10.0.0",
- "tokio",
-]
-
-[[package]]
-name = "non-fungible-token-io"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "non-fungible-token-state"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "non-fungible-token-io",
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
]
[[package]]
@@ -4841,23 +4809,39 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aeaf4ad7403de93e699c191202f017118df734d3850b01e13a3a8b2e6953d3c9"
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
[[package]]
name = "num-bigint"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7"
+checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
dependencies = [
"num-integer",
"num-traits",
]
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
[[package]]
name = "num-format"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"itoa",
]
@@ -4896,7 +4880,7 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
- "hermit-abi",
+ "hermit-abi 0.3.9",
"libc",
]
@@ -4917,33 +4901,21 @@ checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "numerated"
-version = "1.4.2"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b8ba7cd770cf9c8fe653054e72ee8b89ee8a9a95eaf23e9f5c993c9ec32123d"
+checksum = "3a69cf1ec2d851989779599f39243010d15117bf3381b1153f2697811e01bce5"
dependencies = [
- "derive_more",
+ "derive_more 0.99.18",
"num-traits",
"parity-scale-codec",
"scale-info",
]
-[[package]]
-name = "object"
-version = "0.28.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424"
-dependencies = [
- "crc32fast",
- "hashbrown 0.11.2",
- "indexmap 1.9.3",
- "memchr",
-]
-
[[package]]
name = "object"
version = "0.30.4"
@@ -4958,61 +4930,18 @@ dependencies = [
[[package]]
name = "object"
-version = "0.32.2"
+version = "0.36.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
+checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
dependencies = [
"memchr",
]
-[[package]]
-name = "on-chain-nft"
-version = "1.1.0"
-dependencies = [
- "gclient",
- "gear-lib-derive",
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "on-chain-nft-io",
- "on-chain-nft-state",
- "primitive-types",
- "tokio",
-]
-
-[[package]]
-name = "on-chain-nft-io"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "on-chain-nft-state"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "on-chain-nft-io",
-]
-
[[package]]
name = "once_cell"
-version = "1.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
-
-[[package]]
-name = "opaque-debug"
-version = "0.2.3"
+version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
+checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "opaque-debug"
@@ -5087,6 +5016,12 @@ dependencies = [
"oracle-io",
]
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
[[package]]
name = "page_size"
version = "0.6.0"
@@ -5097,31 +5032,45 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "parity-bip39"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9"
+dependencies = [
+ "bitcoin_hashes",
+ "rand",
+ "rand_core",
+ "serde",
+ "unicode-normalization",
+]
+
[[package]]
name = "parity-scale-codec"
-version = "3.6.12"
+version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee"
+checksum = "8be4817d39f3272f69c59fe05d0535ae6456c2dc2fa1ba02910296c7e0a5c590"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"bitvec",
"byte-slice-cast",
"bytes",
"impl-trait-for-tuples",
"parity-scale-codec-derive",
+ "rustversion",
"serde",
]
[[package]]
name = "parity-scale-codec-derive"
-version = "3.6.12"
+version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c"
+checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b"
dependencies = [
- "proc-macro-crate 3.1.0",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.89",
]
[[package]]
@@ -5132,9 +5081,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304"
[[package]]
name = "parking"
-version = "2.2.0"
+version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
[[package]]
name = "parking_lot"
@@ -5156,7 +5105,18 @@ dependencies = [
"libc",
"redox_syscall",
"smallvec",
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "password-hash"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166"
+dependencies = [
+ "base64ct",
+ "rand_core",
+ "subtle",
]
[[package]]
@@ -5173,68 +5133,115 @@ checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef"
[[package]]
name = "pathdiff"
-version = "0.2.1"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd"
+checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
[[package]]
name = "pbkdf2"
-version = "0.8.0"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
dependencies = [
- "crypto-mac 0.11.1",
+ "digest 0.10.7",
+ "password-hash",
]
[[package]]
-name = "pbkdf2"
-version = "0.11.0"
+name = "percent-encoding"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
+[[package]]
+name = "pest"
+version = "2.7.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442"
dependencies = [
- "digest 0.10.7",
+ "memchr",
+ "thiserror",
+ "ucd-trie",
]
[[package]]
-name = "pbkdf2"
-version = "0.12.2"
+name = "pest_derive"
+version = "2.7.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd"
dependencies = [
- "digest 0.10.7",
+ "pest",
+ "pest_generator",
]
[[package]]
-name = "percent-encoding"
-version = "2.3.1"
+name = "pest_generator"
+version = "2.7.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e"
+dependencies = [
+ "pest",
+ "pest_meta",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "pest_meta"
+version = "2.7.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d"
+dependencies = [
+ "once_cell",
+ "pest",
+ "sha2 0.10.8",
+]
+
+[[package]]
+name = "petgraph"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
+dependencies = [
+ "fixedbitset",
+ "indexmap 2.6.0",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher 0.3.11",
+]
[[package]]
name = "pin-project"
-version = "1.1.5"
+version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
+checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.1.5"
+version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
+checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "pin-project-lite"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
[[package]]
name = "pin-utils"
@@ -5243,40 +5250,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
-name = "ping"
+name = "ping-pong"
version = "1.1.0"
dependencies = [
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "ping-io",
+ "ping-pong",
+ "ping-pong-app",
+ "ping-pong-client",
+ "sails-idl-gen",
+ "sails-rs",
+ "tokio",
]
[[package]]
-name = "ping-io"
+name = "ping-pong-app"
version = "1.1.0"
dependencies = [
- "gmeta",
- "gstd",
+ "sails-rs",
]
[[package]]
-name = "ping-state"
+name = "ping-pong-client"
version = "1.1.0"
dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
+ "mockall",
+ "ping-pong-app",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
]
[[package]]
name = "piper"
-version = "0.2.1"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4"
+checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
dependencies = [
"atomic-waker",
- "fastrand 2.1.0",
+ "fastrand",
"futures-io",
]
@@ -5291,40 +5301,63 @@ dependencies = [
]
[[package]]
-name = "platforms"
-version = "3.4.0"
+name = "player-app"
+version = "1.1.0"
+dependencies = [
+ "gstd",
+ "sails-rs",
+]
+
+[[package]]
+name = "polkavm-common"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7"
+checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92"
[[package]]
-name = "polling"
-version = "2.8.0"
+name = "polkavm-derive"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce"
+checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606"
dependencies = [
- "autocfg",
- "bitflags 1.3.2",
- "cfg-if",
- "concurrent-queue",
- "libc",
- "log",
- "pin-project-lite",
- "windows-sys 0.48.0",
+ "polkavm-derive-impl-macro",
+]
+
+[[package]]
+name = "polkavm-derive-impl"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c"
+dependencies = [
+ "polkavm-common",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "polkavm-derive-impl-macro"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429"
+dependencies = [
+ "polkavm-derive-impl",
+ "syn 2.0.89",
]
[[package]]
name = "polling"
-version = "3.7.0"
+version = "3.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3"
+checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f"
dependencies = [
"cfg-if",
"concurrent-queue",
- "hermit-abi",
+ "hermit-abi 0.4.0",
"pin-project-lite",
- "rustix 0.38.34",
+ "rustix 0.38.41",
"tracing",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -5334,36 +5367,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
dependencies = [
"cpufeatures",
- "opaque-debug 0.3.1",
+ "opaque-debug",
"universal-hash",
]
[[package]]
-name = "polyval"
-version = "0.6.2"
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
dependencies = [
- "cfg-if",
- "cpufeatures",
- "opaque-debug 0.3.1",
- "universal-hash",
+ "zerocopy",
]
[[package]]
-name = "ppv-lite86"
-version = "0.2.17"
+name = "precomputed-hash"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
-name = "prettier-please"
-version = "0.2.0"
+name = "predicates"
+version = "3.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97"
+dependencies = [
+ "anstyle",
+ "predicates-core",
+]
+
+[[package]]
+name = "predicates-core"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931"
+
+[[package]]
+name = "predicates-tree"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13"
+dependencies = [
+ "predicates-core",
+ "termtree",
+]
+
+[[package]]
+name = "prettyplease"
+version = "0.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22020dfcf177fcc7bf5deaf7440af371400c67c0de14c399938d8ed4fb4645d3"
+checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033"
dependencies = [
"proc-macro2",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
@@ -5391,11 +5453,11 @@ dependencies = [
[[package]]
name = "proc-macro-crate"
-version = "3.1.0"
+version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
+checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b"
dependencies = [
- "toml_edit 0.21.1",
+ "toml_edit 0.22.22",
]
[[package]]
@@ -5424,29 +5486,29 @@ dependencies = [
[[package]]
name = "proc-macro-warning"
-version = "0.4.2"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e"
+checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "proc-macro2"
-version = "1.0.86"
+version = "1.0.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
+checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
dependencies = [
"unicode-ident",
]
[[package]]
name = "psm"
-version = "0.1.21"
+version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874"
+checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810"
dependencies = [
"cc",
]
@@ -5473,9 +5535,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.36"
+version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
@@ -5486,19 +5548,6 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
-[[package]]
-name = "rand"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
-dependencies = [
- "getrandom 0.1.16",
- "libc",
- "rand_chacha 0.2.2",
- "rand_core 0.5.1",
- "rand_hc",
-]
-
[[package]]
name = "rand"
version = "0.8.5"
@@ -5506,64 +5555,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
- "rand_chacha 0.3.1",
- "rand_core 0.6.4",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
-dependencies = [
- "ppv-lite86",
- "rand_core 0.5.1",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
-dependencies = [
- "ppv-lite86",
- "rand_core 0.6.4",
+ "rand_chacha",
+ "rand_core",
]
[[package]]
-name = "rand_core"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
-dependencies = [
- "getrandom 0.1.16",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
-dependencies = [
- "getrandom 0.2.15",
-]
-
-[[package]]
-name = "rand_hc"
-version = "0.2.0"
+name = "rand_chacha"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
- "rand_core 0.5.1",
+ "ppv-lite86",
+ "rand_core",
]
[[package]]
-name = "rand_xoshiro"
-version = "0.6.0"
+name = "rand_core"
+version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
- "rand_core 0.6.4",
+ "getrandom",
]
[[package]]
@@ -5586,22 +5598,38 @@ dependencies = [
"crossbeam-utils",
]
+[[package]]
+name = "reconnecting-jsonrpsee-ws-client"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06fa4f17e09edfc3131636082faaec633c7baa269396b4004040bc6c52f49f65"
+dependencies = [
+ "cfg_aliases",
+ "finito",
+ "futures",
+ "jsonrpsee 0.23.2",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tracing",
+]
+
[[package]]
name = "redox_syscall"
-version = "0.5.1"
+version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
+checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
dependencies = [
- "bitflags 2.5.0",
+ "bitflags 2.6.0",
]
[[package]]
name = "redox_users"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
+checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
- "getrandom 0.2.15",
+ "getrandom",
"libredox",
"thiserror",
]
@@ -5623,30 +5651,19 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
-]
-
-[[package]]
-name = "regalloc"
-version = "0.0.34"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02"
-dependencies = [
- "log",
- "rustc-hash",
- "smallvec",
+ "syn 2.0.89",
]
[[package]]
name = "regex"
-version = "1.10.4"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
- "regex-automata 0.4.6",
- "regex-syntax 0.8.3",
+ "regex-automata 0.4.9",
+ "regex-syntax 0.8.5",
]
[[package]]
@@ -5660,13 +5677,13 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.6"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
- "regex-syntax 0.8.3",
+ "regex-syntax 0.8.5",
]
[[package]]
@@ -5677,9 +5694,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
-version = "0.8.3"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "region"
@@ -5693,6 +5710,12 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "relative-path"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2"
+
[[package]]
name = "rend"
version = "0.4.2"
@@ -5702,46 +5725,6 @@ dependencies = [
"bytecheck",
]
-[[package]]
-name = "rentable-nft"
-version = "1.1.0"
-dependencies = [
- "gclient",
- "gear-lib-derive",
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "hex-literal",
- "primitive-types",
- "rentable-nft-io",
- "sp-core 21.0.0",
- "sp-core-hashing 10.0.0",
- "tokio",
-]
-
-[[package]]
-name = "rentable-nft-io"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "rentable-nft-state"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "rentable-nft-io",
-]
-
[[package]]
name = "rfc6979"
version = "0.4.0"
@@ -5760,7 +5743,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
dependencies = [
"cc",
"cfg-if",
- "getrandom 0.2.15",
+ "getrandom",
"libc",
"spin",
"untrusted",
@@ -5769,14 +5752,15 @@ dependencies = [
[[package]]
name = "rkyv"
-version = "0.7.44"
+version = "0.7.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0"
+checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b"
dependencies = [
"bitvec",
"bytecheck",
"bytes",
"hashbrown 0.12.3",
+ "indexmap 1.9.3",
"ptr_meta",
"rend",
"rkyv_derive",
@@ -5787,9 +5771,9 @@ dependencies = [
[[package]]
name = "rkyv_derive"
-version = "0.7.44"
+version = "0.7.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65"
+checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0"
dependencies = [
"proc-macro2",
"quote",
@@ -5881,236 +5865,367 @@ dependencies = [
]
[[package]]
-name = "rock-paper-scissors"
+name = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "rustc-hash"
version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "rustc-hash"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
+
+[[package]]
+name = "rustc-hex"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
- "gclient",
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "rock-paper-scissors-io",
- "sp-core-hashing 10.0.0",
- "tokio",
+ "semver",
]
[[package]]
-name = "rock-paper-scissors-io"
-version = "1.1.0"
+name = "rustix"
+version = "0.36.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed"
dependencies = [
- "gmeta",
- "gstd",
+ "bitflags 1.3.2",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys 0.1.4",
+ "windows-sys 0.45.0",
]
[[package]]
-name = "rock-paper-scissors-state"
-version = "1.1.0"
+name = "rustix"
+version = "0.38.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6"
dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "rock-paper-scissors-io",
+ "bitflags 2.6.0",
+ "errno",
+ "libc",
+ "linux-raw-sys 0.4.14",
+ "windows-sys 0.52.0",
]
[[package]]
-name = "roll-the-dice"
-version = "1.1.0"
+name = "rustls"
+version = "0.21.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
dependencies = [
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "oracle",
- "oracle-io",
- "roll-the-dice-io",
- "roll-the-dice-state",
+ "log",
+ "ring",
+ "rustls-webpki 0.101.7",
+ "sct",
]
[[package]]
-name = "roll-the-dice-io"
-version = "1.1.0"
+name = "rustls"
+version = "0.22.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
dependencies = [
- "gmeta",
- "gstd",
+ "log",
+ "ring",
+ "rustls-pki-types",
+ "rustls-webpki 0.102.8",
+ "subtle",
+ "zeroize",
]
[[package]]
-name = "roll-the-dice-state"
-version = "1.1.0"
+name = "rustls"
+version = "0.23.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1"
dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "roll-the-dice-io",
+ "log",
+ "once_cell",
+ "ring",
+ "rustls-pki-types",
+ "rustls-webpki 0.102.8",
+ "subtle",
+ "zeroize",
]
[[package]]
-name = "rustc-demangle"
-version = "0.1.24"
+name = "rustls-native-certs"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
+dependencies = [
+ "openssl-probe",
+ "rustls-pemfile 1.0.4",
+ "schannel",
+ "security-framework",
+]
[[package]]
-name = "rustc-hash"
-version = "1.1.0"
+name = "rustls-native-certs"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
+dependencies = [
+ "openssl-probe",
+ "rustls-pemfile 2.2.0",
+ "rustls-pki-types",
+ "schannel",
+ "security-framework",
+]
[[package]]
-name = "rustc-hex"
-version = "2.1.0"
+name = "rustls-pemfile"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6"
+checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
+dependencies = [
+ "base64 0.21.7",
+]
[[package]]
-name = "rustc_version"
-version = "0.4.0"
+name = "rustls-pemfile"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
dependencies = [
- "semver",
+ "rustls-pki-types",
]
[[package]]
-name = "rustix"
-version = "0.36.17"
+name = "rustls-pki-types"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed"
+checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
+
+[[package]]
+name = "rustls-platform-verifier"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490"
dependencies = [
- "bitflags 1.3.2",
- "errno",
- "io-lifetimes",
- "libc",
- "linux-raw-sys 0.1.4",
- "windows-sys 0.45.0",
+ "core-foundation",
+ "core-foundation-sys",
+ "jni",
+ "log",
+ "once_cell",
+ "rustls 0.23.19",
+ "rustls-native-certs 0.7.3",
+ "rustls-platform-verifier-android",
+ "rustls-webpki 0.102.8",
+ "security-framework",
+ "security-framework-sys",
+ "webpki-roots",
+ "winapi",
]
[[package]]
-name = "rustix"
-version = "0.37.27"
+name = "rustls-platform-verifier-android"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
+
+[[package]]
+name = "rustls-webpki"
+version = "0.101.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2"
+checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
dependencies = [
- "bitflags 1.3.2",
- "errno",
- "io-lifetimes",
- "libc",
- "linux-raw-sys 0.3.8",
- "windows-sys 0.48.0",
+ "ring",
+ "untrusted",
]
[[package]]
-name = "rustix"
-version = "0.38.34"
+name = "rustls-webpki"
+version = "0.102.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
+checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
dependencies = [
- "bitflags 2.5.0",
- "errno",
- "libc",
- "linux-raw-sys 0.4.13",
- "windows-sys 0.52.0",
+ "ring",
+ "rustls-pki-types",
+ "untrusted",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
+
+[[package]]
+name = "ruzstd"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d"
+dependencies = [
+ "byteorder",
+ "derive_more 0.99.18",
+ "twox-hash",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+
+[[package]]
+name = "sails-client-gen"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcb553c80a7ef58a18dcffb5f9e7e95abd62489973a078cb2b74c3cb722c3f56"
+dependencies = [
+ "anyhow",
+ "convert_case 0.6.0",
+ "genco",
+ "parity-scale-codec",
+ "sails-idl-parser",
]
[[package]]
-name = "rustls"
-version = "0.21.12"
+name = "sails-idl-gen"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
+checksum = "0ac8991c77cffc3ba428beff5e751efe078dc9a4545713b9407990336e0e3510"
dependencies = [
- "log",
- "ring",
- "rustls-webpki",
- "sct",
+ "convert_case 0.6.0",
+ "gprimitives",
+ "handlebars",
+ "sails-idl-meta",
+ "scale-info",
+ "serde",
+ "serde_json",
+ "thiserror",
]
[[package]]
-name = "rustls-native-certs"
-version = "0.6.3"
+name = "sails-idl-meta"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
+checksum = "b5fb2e96b80c25e5d605fada5b27b4af2db706bb07edf09b95280d8416ebad02"
dependencies = [
- "openssl-probe",
- "rustls-pemfile",
- "schannel",
- "security-framework",
+ "scale-info",
]
[[package]]
-name = "rustls-pemfile"
-version = "1.0.4"
+name = "sails-idl-parser"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
+checksum = "a820c4eceb2b8babe8e04340c33db60d9515b45108de551b5ba1ec95fb6539ee"
dependencies = [
- "base64 0.21.7",
+ "lalrpop",
+ "lalrpop-util",
+ "logos",
+ "thiserror",
]
[[package]]
-name = "rustls-webpki"
-version = "0.101.7"
+name = "sails-macros"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
+checksum = "82ddc0bb14c20d3fb229795dd7caeb48f579fd604aeeb965874aa6ec86423aa9"
dependencies = [
- "ring",
- "untrusted",
+ "proc-macro-error",
+ "sails-macros-core",
]
[[package]]
-name = "rustversion"
-version = "1.0.16"
+name = "sails-macros-core"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0"
+checksum = "b1ac3605bcc28e7042268571f2f489f665f9a889b2946c28d4b8c66803ce6dc4"
+dependencies = [
+ "convert_case 0.6.0",
+ "parity-scale-codec",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
[[package]]
-name = "ruzstd"
-version = "0.4.0"
+name = "sails-rs"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc"
+checksum = "2761c7386e4c64c7445da17cddbc921de651d9d31bab6cf906d10bdd0ff89e33"
dependencies = [
- "byteorder",
- "thiserror-core",
- "twox-hash",
+ "futures",
+ "gear-core",
+ "gear-core-errors",
+ "gear-wasm-builder",
+ "gprimitives",
+ "gstd",
+ "gtest",
+ "hashbrown 0.15.2",
+ "hex",
+ "mockall",
+ "parity-scale-codec",
+ "sails-idl-meta",
+ "sails-macros",
+ "scale-info",
+ "spin",
+ "thiserror-no-std",
]
[[package]]
-name = "ryu"
-version = "1.0.18"
+name = "same-file"
+version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
[[package]]
name = "scale-bits"
-version = "0.4.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "036575c29af9b6e4866ffb7fa055dbf623fe7a9cc159b33786de6013a6969d89"
+checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54"
dependencies = [
"parity-scale-codec",
"scale-info",
+ "scale-type-resolver",
"serde",
]
[[package]]
name = "scale-decode"
-version = "0.9.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7789f5728e4e954aaa20cadcc370b99096fb8645fca3c9333ace44bb18f30095"
+checksum = "e98f3262c250d90e700bb802eb704e1f841e03331c2eb815e46516c4edbf5b27"
dependencies = [
- "derive_more",
+ "derive_more 0.99.18",
"parity-scale-codec",
"primitive-types",
"scale-bits",
"scale-decode-derive",
- "scale-info",
+ "scale-type-resolver",
"smallvec",
]
[[package]]
name = "scale-decode-derive"
-version = "0.9.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47"
+checksum = "9bb22f574168103cdd3133b19281639ca65ad985e24612728f727339dcaf4021"
dependencies = [
"darling 0.14.4",
- "proc-macro-crate 1.3.1",
"proc-macro2",
"quote",
"syn 1.0.109",
@@ -6118,41 +6233,41 @@ dependencies = [
[[package]]
name = "scale-encode"
-version = "0.5.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d70cb4b29360105483fac1ed567ff95d65224a14dd275b6303ed0a654c78de5"
+checksum = "528464e6ae6c8f98e2b79633bf79ef939552e795e316579dab09c61670d56602"
dependencies = [
- "derive_more",
+ "derive_more 0.99.18",
"parity-scale-codec",
"primitive-types",
"scale-bits",
"scale-encode-derive",
- "scale-info",
+ "scale-type-resolver",
"smallvec",
]
[[package]]
name = "scale-encode-derive"
-version = "0.5.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25"
+checksum = "bef2618f123c88da9cd8853b69d766068f1eddc7692146d7dfe9b89e25ce2efd"
dependencies = [
- "darling 0.14.4",
- "proc-macro-crate 1.3.1",
+ "darling 0.20.10",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.89",
]
[[package]]
name = "scale-info"
-version = "2.11.3"
+version = "2.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024"
+checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b"
dependencies = [
"bitvec",
"cfg-if",
- "derive_more",
+ "derive_more 1.0.0",
"parity-scale-codec",
"scale-info-derive",
"serde",
@@ -6160,25 +6275,48 @@ dependencies = [
[[package]]
name = "scale-info-derive"
-version = "2.11.3"
+version = "2.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62"
+checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf"
dependencies = [
- "proc-macro-crate 3.1.0",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "scale-type-resolver"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb"
+dependencies = [
+ "scale-info",
+ "smallvec",
+]
+
+[[package]]
+name = "scale-typegen"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "498d1aecf2ea61325d4511787c115791639c0fd21ef4f8e11e49dd09eff2bbac"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "scale-info",
+ "syn 2.0.89",
+ "thiserror",
]
[[package]]
name = "scale-value"
-version = "0.12.0"
+version = "0.16.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6538d1cc1af9c0baf401c57da8a6d4730ef582db0d330d2efa56ec946b5b0283"
+checksum = "8cd6ab090d823e75cfdb258aad5fe92e13f2af7d04b43a55d607d25fcc38c811"
dependencies = [
"base58",
"blake2",
- "derive_more",
+ "derive_more 0.99.18",
"either",
"frame-metadata 15.1.0",
"parity-scale-codec",
@@ -6186,48 +6324,31 @@ dependencies = [
"scale-decode",
"scale-encode",
"scale-info",
+ "scale-type-resolver",
"serde",
"yap",
]
[[package]]
name = "schannel"
-version = "0.1.23"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
+checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "schnellru"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b0cf7da6fc4477944d5529807234f66802fcb618fc62b9c05bedca7f9be6c43"
+checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367"
dependencies = [
"ahash 0.8.11",
"cfg-if",
"hashbrown 0.13.2",
]
-[[package]]
-name = "schnorrkel"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862"
-dependencies = [
- "arrayref",
- "arrayvec 0.5.2",
- "curve25519-dalek 2.1.3",
- "getrandom 0.1.16",
- "merlin 2.0.1",
- "rand 0.7.3",
- "rand_core 0.5.1",
- "sha2 0.8.2",
- "subtle",
- "zeroize",
-]
-
[[package]]
name = "schnorrkel"
version = "0.10.2"
@@ -6235,10 +6356,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d"
dependencies = [
"arrayref",
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"curve25519-dalek-ng",
- "merlin 3.0.0",
- "rand_core 0.6.4",
+ "merlin",
+ "rand_core",
"sha2 0.9.9",
"subtle-ng",
"zeroize",
@@ -6250,12 +6371,14 @@ version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0"
dependencies = [
+ "aead",
"arrayref",
- "arrayvec 0.7.4",
- "curve25519-dalek 4.1.2",
+ "arrayvec 0.7.6",
+ "curve25519-dalek",
"getrandom_or_panic",
- "merlin 3.0.0",
- "rand_core 0.6.4",
+ "merlin",
+ "rand_core",
+ "serde_bytes",
"sha2 0.10.8",
"subtle",
"zeroize",
@@ -6291,26 +6414,27 @@ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
dependencies = [
"base16ct",
"der",
- "generic-array 0.14.7",
+ "generic-array",
"pkcs8",
+ "serdect",
"subtle",
"zeroize",
]
[[package]]
name = "secp256k1"
-version = "0.24.3"
+version = "0.28.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62"
+checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10"
dependencies = [
"secp256k1-sys",
]
[[package]]
name = "secp256k1-sys"
-version = "0.6.1"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b"
+checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb"
dependencies = [
"cc",
]
@@ -6326,27 +6450,34 @@ dependencies = [
[[package]]
name = "security-framework"
-version = "2.11.0"
+version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0"
+checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
- "bitflags 2.5.0",
+ "bitflags 2.6.0",
"core-foundation",
"core-foundation-sys",
"libc",
+ "num-bigint",
"security-framework-sys",
]
[[package]]
name = "security-framework-sys"
-version = "2.11.0"
+version = "2.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7"
+checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2"
dependencies = [
"core-foundation-sys",
"libc",
]
+[[package]]
+name = "self_cell"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a"
+
[[package]]
name = "semver"
version = "1.0.23"
@@ -6358,251 +6489,141 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.201"
+version = "1.0.215"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c"
+checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
dependencies = [
"serde_derive",
]
+[[package]]
+name = "serde-wasm-bindgen"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf"
+dependencies = [
+ "js-sys",
+ "serde",
+ "wasm-bindgen",
+]
+
[[package]]
name = "serde_bytes"
-version = "0.11.14"
+version = "0.11.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734"
+checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a"
dependencies = [
"serde",
]
[[package]]
name = "serde_derive"
-version = "1.0.201"
+version = "1.0.215"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865"
+checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "serde_json"
-version = "1.0.117"
+version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
dependencies = [
"itoa",
+ "memchr",
"ryu",
"serde",
]
[[package]]
name = "serde_spanned"
-version = "0.6.6"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
dependencies = [
"serde",
]
[[package]]
-name = "sha-1"
-version = "0.9.8"
+name = "serdect"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6"
+checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177"
dependencies = [
- "block-buffer 0.9.0",
- "cfg-if",
- "cpufeatures",
- "digest 0.9.0",
- "opaque-debug 0.3.1",
+ "base16ct",
+ "serde",
]
[[package]]
-name = "sha2"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69"
+name = "session-service"
+version = "0.1.0"
+source = "git+https://github.com/gear-foundation/signless-gasless-session-service.git#55a92c344f901a435f8748e9d9f1f21c7fbd1ad9"
dependencies = [
- "block-buffer 0.7.3",
- "digest 0.8.1",
- "fake-simd",
- "opaque-debug 0.2.3",
+ "gstd",
+ "sails-rs",
+ "schnorrkel 0.10.2",
]
[[package]]
-name = "sha2"
-version = "0.9.9"
+name = "sha-1"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
+checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6"
dependencies = [
"block-buffer 0.9.0",
"cfg-if",
"cpufeatures",
"digest 0.9.0",
- "opaque-debug 0.3.1",
+ "opaque-debug",
]
[[package]]
-name = "sha2"
-version = "0.10.8"
+name = "sha1"
+version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if",
- "cpufeatures",
- "digest 0.10.7",
-]
-
-[[package]]
-name = "sha3"
-version = "0.10.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
-dependencies = [
- "digest 0.10.7",
- "keccak",
-]
-
-[[package]]
-name = "sharded-fungible-token"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "hex-literal",
- "primitive-types",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-logic-io",
- "sharded-fungible-token-storage",
- "sp-core 21.0.0",
- "sp-core-hashing 10.0.0",
-]
-
-[[package]]
-name = "sharded-fungible-token-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "sharded-fungible-token-logic"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gear-wasm-builder",
- "gstd",
- "hex",
- "primitive-types",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic-io",
- "sharded-fungible-token-storage-io",
-]
-
-[[package]]
-name = "sharded-fungible-token-logic-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
- "sharded-fungible-token-io",
- "sharded-fungible-token-storage-io",
-]
-
-[[package]]
-name = "sharded-fungible-token-storage"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gstd",
- "primitive-types",
- "sharded-fungible-token-storage-io",
-]
-
-[[package]]
-name = "sharded-fungible-token-storage-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "sharded-multi-token"
-version = "1.1.0"
-dependencies = [
- "blake2-rfc",
- "gclient",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "primitive-types",
- "sharded-multi-token-io",
- "sharded-multi-token-logic",
- "sharded-multi-token-logic-io",
- "sharded-multi-token-storage",
- "sp-core-hashing 10.0.0",
- "tokio",
-]
-
-[[package]]
-name = "sharded-multi-token-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
-]
-
-[[package]]
-name = "sharded-multi-token-logic"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gstd",
- "hex",
- "primitive-types",
- "sharded-multi-token-io",
- "sharded-multi-token-logic-io",
- "sharded-multi-token-storage-io",
+ "cpufeatures",
+ "digest 0.10.7",
]
[[package]]
-name = "sharded-multi-token-logic-io"
-version = "1.1.0"
+name = "sha2"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
- "sharded-multi-token-io",
- "sharded-multi-token-storage-io",
+ "block-buffer 0.9.0",
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.9.0",
+ "opaque-debug",
]
[[package]]
-name = "sharded-multi-token-storage"
-version = "1.1.0"
+name = "sha2"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
- "gear-wasm-builder",
- "gstd",
- "primitive-types",
- "sharded-multi-token-storage-io",
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
]
[[package]]
-name = "sharded-multi-token-storage-io"
-version = "1.1.0"
+name = "sha3"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
dependencies = [
- "gmeta",
- "gstd",
- "primitive-types",
+ "digest 0.10.7",
+ "keccak",
]
[[package]]
@@ -6614,6 +6635,22 @@ dependencies = [
"lazy_static",
]
+[[package]]
+name = "shared-buffer"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6c99835bad52957e7aa241d3975ed17c1e5f8c92026377d117a606f36b84b16"
+dependencies = [
+ "bytes",
+ "memmap2 0.6.2",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
[[package]]
name = "signal-hook-registry"
version = "1.4.2"
@@ -6623,12 +6660,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "signature"
-version = "1.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
-
[[package]]
name = "signature"
version = "2.2.0"
@@ -6636,14 +6667,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
dependencies = [
"digest 0.10.7",
- "rand_core 0.6.4",
+ "rand_core",
]
[[package]]
name = "simdutf8"
-version = "0.1.4"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
+
+[[package]]
+name = "simple-mermaid"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a"
+checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18"
[[package]]
name = "siphasher"
@@ -6651,6 +6688,12 @@ version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+[[package]]
+name = "siphasher"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
+
[[package]]
name = "slab"
version = "0.4.9"
@@ -6668,126 +6711,110 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "smol"
-version = "1.3.0"
+version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1"
+checksum = "a33bd3e260892199c3ccfc487c88b2da2265080acb316cd920da72fdfd7c599f"
dependencies = [
- "async-channel 1.9.0",
+ "async-channel",
"async-executor",
"async-fs",
- "async-io 1.13.0",
- "async-lock 2.8.0",
+ "async-io",
+ "async-lock",
"async-net",
"async-process",
"blocking",
- "futures-lite 1.13.0",
+ "futures-lite",
]
[[package]]
name = "smoldot"
-version = "0.8.0"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cce5e2881b30bad7ef89f383a816ad0b22c45915911f28499026de4a76d20ee"
+checksum = "e6d1eaa97d77be4d026a1e7ffad1bb3b78448763b357ea6f8188d3e6f736a9b9"
dependencies = [
- "arrayvec 0.7.4",
- "async-lock 2.8.0",
- "atomic",
+ "arrayvec 0.7.6",
+ "async-lock",
+ "atomic-take",
"base64 0.21.7",
"bip39",
"blake2-rfc",
- "bs58 0.5.1",
+ "bs58",
+ "chacha20",
"crossbeam-queue",
- "derive_more",
+ "derive_more 0.99.18",
"ed25519-zebra",
"either",
- "event-listener 2.5.3",
+ "event-listener 4.0.3",
"fnv",
- "futures-channel",
+ "futures-lite",
"futures-util",
"hashbrown 0.14.5",
"hex",
"hmac 0.12.1",
- "itertools",
+ "itertools 0.12.1",
+ "libm",
"libsecp256k1",
- "merlin 3.0.0",
+ "merlin",
"no-std-net",
"nom",
"num-bigint",
"num-rational",
"num-traits",
- "pbkdf2 0.12.2",
+ "pbkdf2",
"pin-project",
- "rand 0.8.5",
- "rand_chacha 0.3.1",
+ "poly1305",
+ "rand",
+ "rand_chacha",
"ruzstd",
- "schnorrkel 0.10.2",
+ "schnorrkel 0.11.4",
"serde",
"serde_json",
"sha2 0.10.8",
- "siphasher",
+ "sha3",
+ "siphasher 1.0.1",
"slab",
"smallvec",
- "smol",
- "snow",
- "soketto",
- "tiny-keccak",
+ "soketto 0.7.1",
"twox-hash",
- "wasmi 0.30.0",
+ "wasmi 0.31.2",
+ "x25519-dalek",
+ "zeroize",
]
[[package]]
name = "smoldot-light"
-version = "0.6.0"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b2f7b4687b83ff244ef6137735ed5716ad37dcdf3ee16c4eb1a32fb9808fa47"
+checksum = "5496f2d116b7019a526b1039ec2247dd172b8670633b1a64a614c9ea12c9d8c7"
dependencies = [
- "async-lock 2.8.0",
+ "async-channel",
+ "async-lock",
+ "base64 0.21.7",
"blake2-rfc",
- "derive_more",
+ "derive_more 0.99.18",
"either",
- "event-listener 2.5.3",
+ "event-listener 4.0.3",
"fnv",
"futures-channel",
+ "futures-lite",
"futures-util",
"hashbrown 0.14.5",
"hex",
- "itertools",
+ "itertools 0.12.1",
"log",
"lru",
+ "no-std-net",
"parking_lot",
- "rand 0.8.5",
+ "pin-project",
+ "rand",
+ "rand_chacha",
"serde",
"serde_json",
- "siphasher",
+ "siphasher 1.0.1",
"slab",
"smol",
"smoldot",
-]
-
-[[package]]
-name = "snow"
-version = "0.9.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85"
-dependencies = [
- "aes-gcm",
- "blake2",
- "chacha20poly1305",
- "curve25519-dalek 4.1.2",
- "rand_core 0.6.4",
- "rustc_version",
- "sha2 0.10.8",
- "subtle",
-]
-
-[[package]]
-name = "socket2"
-version = "0.4.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
-dependencies = [
- "libc",
- "winapi",
+ "zeroize",
]
[[package]]
@@ -6811,27 +6838,43 @@ dependencies = [
"futures",
"httparse",
"log",
- "rand 0.8.5",
+ "rand",
"sha-1",
]
+[[package]]
+name = "soketto"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37468c595637c10857701c990f93a40ce0e357cedb0953d1c26c8d8027f9bb53"
+dependencies = [
+ "base64 0.22.1",
+ "bytes",
+ "futures",
+ "httparse",
+ "log",
+ "rand",
+ "sha1",
+]
+
[[package]]
name = "sp-api"
-version = "20.0.0"
+version = "34.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1aa63dcdd3fb081a894189f83115dd683be1339a919cd7d3f98f145d1870626c"
+checksum = "bbce492e0482134128b7729ea36f5ef1a9f9b4de2d48ff8dde7b5e464e28ce75"
dependencies = [
+ "docify",
"hash-db",
"log",
"parity-scale-codec",
"scale-info",
"sp-api-proc-macro",
- "sp-core 22.0.0",
- "sp-externalities 0.20.0",
+ "sp-core",
+ "sp-externalities 0.29.0",
"sp-metadata-ir",
"sp-runtime",
+ "sp-runtime-interface",
"sp-state-machine",
- "sp-std 9.0.0",
"sp-trie",
"sp-version",
"thiserror",
@@ -6839,147 +6882,100 @@ dependencies = [
[[package]]
name = "sp-api-proc-macro"
-version = "9.0.0"
+version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a062dfff051064bfa1837566b74d00a49050b36e3887b2283ab667cef4f3a85e"
+checksum = "c9aadf9e97e694f0e343978aa632938c5de309cbcc8afed4136cb71596737278"
dependencies = [
"Inflector",
"blake2",
"expander",
- "proc-macro-crate 1.3.1",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "sp-application-crypto"
-version = "24.0.0"
+version = "38.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b49d62089ef6fdd52a6f90f670d533ccb365235258cf517dbd5bd571febcfbd"
+checksum = "0d8133012faa5f75b2f0b1619d9f720c1424ac477152c143e5f7dbde2fe1a958"
dependencies = [
"parity-scale-codec",
"scale-info",
"serde",
- "sp-core 22.0.0",
+ "sp-core",
"sp-io",
- "sp-std 9.0.0",
]
[[package]]
name = "sp-arithmetic"
-version = "17.0.0"
+version = "26.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0241327405688cac3fcc29114fd35f99224e321daa37e19920e50e4b2fdd0645"
+checksum = "46d0d0a4c591c421d3231ddd5e27d828618c24456d51445d21a1f79fcee97c23"
dependencies = [
+ "docify",
"integer-sqrt",
"num-traits",
"parity-scale-codec",
"scale-info",
"serde",
- "sp-std 9.0.0",
+ "sp-std 14.0.0",
"static_assertions",
]
[[package]]
name = "sp-core"
-version = "21.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f18d9e2f67d8661f9729f35347069ac29d92758b59135176799db966947a7336"
-dependencies = [
- "array-bytes 4.2.0",
- "bitflags 1.3.2",
- "blake2",
- "bounded-collections",
- "ed25519-zebra",
- "hash-db",
- "hash256-std-hasher",
- "libsecp256k1",
- "log",
- "merlin 2.0.1",
- "parity-scale-codec",
- "paste",
- "primitive-types",
- "scale-info",
- "schnorrkel 0.9.1",
- "secp256k1",
- "secrecy",
- "sp-core-hashing 9.0.0",
- "sp-debug-derive 8.0.0",
- "sp-externalities 0.19.0",
- "sp-runtime-interface 17.0.0",
- "sp-std 8.0.0",
- "sp-storage 13.0.0",
- "ss58-registry",
- "zeroize",
-]
-
-[[package]]
-name = "sp-core"
-version = "22.0.0"
+version = "34.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0de478e02efd547693b33ad02515e09933d5b69b7f3036fa890b92e50fd9dfc"
+checksum = "c961a5e33fb2962fa775c044ceba43df9c6f917e2c35d63bfe23738468fa76a7"
dependencies = [
- "array-bytes 6.2.2",
+ "array-bytes",
"bitflags 1.3.2",
"blake2",
"bounded-collections",
- "bs58 0.4.0",
+ "bs58",
"dyn-clonable",
"ed25519-zebra",
"futures",
"hash-db",
"hash256-std-hasher",
"impl-serde",
- "lazy_static",
+ "itertools 0.11.0",
+ "k256",
"libsecp256k1",
"log",
- "merlin 2.0.1",
+ "merlin",
+ "parity-bip39",
"parity-scale-codec",
"parking_lot",
"paste",
"primitive-types",
- "rand 0.8.5",
- "regex",
+ "rand",
"scale-info",
- "schnorrkel 0.9.1",
+ "schnorrkel 0.11.4",
"secp256k1",
"secrecy",
"serde",
- "sp-core-hashing 10.0.0",
- "sp-debug-derive 9.0.0",
- "sp-externalities 0.20.0",
- "sp-runtime-interface 18.0.0",
- "sp-std 9.0.0",
- "sp-storage 14.0.0",
+ "sp-crypto-hashing",
+ "sp-debug-derive 14.0.0",
+ "sp-externalities 0.29.0",
+ "sp-runtime-interface",
+ "sp-std 14.0.0",
+ "sp-storage 21.0.0",
"ss58-registry",
"substrate-bip39",
"thiserror",
- "tiny-bip39",
"tracing",
+ "w3f-bls",
"zeroize",
]
[[package]]
-name = "sp-core-hashing"
-version = "9.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ee599a8399448e65197f9a6cee338ad192e9023e35e31f22382964c3c174c68"
-dependencies = [
- "blake2b_simd",
- "byteorder",
- "digest 0.10.7",
- "sha2 0.10.8",
- "sha3",
- "sp-std 8.0.0",
- "twox-hash",
-]
-
-[[package]]
-name = "sp-core-hashing"
-version = "10.0.0"
+name = "sp-crypto-hashing"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e360755a2706a76886d58776665cad0db793dece3c7d390455b28e8a1efd6285"
+checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb"
dependencies = [
"blake2b_simd",
"byteorder",
@@ -6990,98 +6986,110 @@ dependencies = [
]
[[package]]
-name = "sp-core-hashing-proc-macro"
-version = "10.0.0"
+name = "sp-crypto-hashing-proc-macro"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8dc707d9f5bf155d584900783e328cb3dc79c950f898a18a8f24066f41f040a5"
+checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b"
dependencies = [
"quote",
- "sp-core-hashing 10.0.0",
- "syn 2.0.72",
+ "sp-crypto-hashing",
+ "syn 2.0.89",
]
[[package]]
name = "sp-debug-derive"
-version = "8.0.0"
+version = "9.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7f531814d2f16995144c74428830ccf7d94ff4a7749632b83ad8199b181140c"
+checksum = "f12dae7cf6c1e825d13ffd4ce16bd9309db7c539929d0302b4443ed451a9f4e5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "sp-debug-derive"
-version = "9.0.0"
+version = "14.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f12dae7cf6c1e825d13ffd4ce16bd9309db7c539929d0302b4443ed451a9f4e5"
+checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "sp-externalities"
-version = "0.19.0"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0f71c671e01a8ca60da925d43a1b351b69626e268b8837f8371e320cf1dd100"
+checksum = "3313e2c5f2523b06062e541dff9961bde88ad5a28861621dc7b7b47a32bb0f7c"
dependencies = [
"environmental",
"parity-scale-codec",
- "sp-std 8.0.0",
- "sp-storage 13.0.0",
+ "sp-std 9.0.0",
+ "sp-storage 14.0.0",
]
[[package]]
name = "sp-externalities"
-version = "0.20.0"
+version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3313e2c5f2523b06062e541dff9961bde88ad5a28861621dc7b7b47a32bb0f7c"
+checksum = "a904407d61cb94228c71b55a9d3708e9d6558991f9e83bd42bd91df37a159d30"
dependencies = [
"environmental",
"parity-scale-codec",
- "sp-std 9.0.0",
- "sp-storage 14.0.0",
+ "sp-storage 21.0.0",
+]
+
+[[package]]
+name = "sp-genesis-builder"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a646ed222fd86d5680faa4a8967980eb32f644cae6c8523e1c689a6deda3e8"
+dependencies = [
+ "parity-scale-codec",
+ "scale-info",
+ "serde_json",
+ "sp-api",
+ "sp-runtime",
]
[[package]]
name = "sp-inherents"
-version = "20.0.0"
+version = "34.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30fe27930fbcc1ddf8e73446c65b2696f3544adeb30d1f5171d360e5c7072c9c"
+checksum = "afffbddc380d99a90c459ba1554bbbc01d62e892de9f1485af6940b89c4c0d57"
dependencies = [
"async-trait",
"impl-trait-for-tuples",
"parity-scale-codec",
"scale-info",
"sp-runtime",
- "sp-std 9.0.0",
"thiserror",
]
[[package]]
name = "sp-io"
-version = "24.0.0"
+version = "38.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff6194309bfe055d93177c6c9d2ed4c7b66040617cf3003a15e509c432cf3b62"
+checksum = "59ef7eb561bb4839cc8424ce58c5ea236cbcca83f26fcc0426d8decfe8aa97d4"
dependencies = [
"bytes",
- "ed25519",
+ "docify",
"ed25519-dalek",
"libsecp256k1",
"log",
"parity-scale-codec",
+ "polkavm-derive",
"rustversion",
"secp256k1",
- "sp-core 22.0.0",
- "sp-externalities 0.20.0",
+ "sp-core",
+ "sp-crypto-hashing",
+ "sp-externalities 0.29.0",
"sp-keystore",
- "sp-runtime-interface 18.0.0",
+ "sp-runtime-interface",
"sp-state-machine",
- "sp-std 9.0.0",
- "sp-tracing 11.0.0",
+ "sp-tracing 17.0.1",
"sp-trie",
"tracing",
"tracing-core",
@@ -7089,34 +7097,32 @@ dependencies = [
[[package]]
name = "sp-keystore"
-version = "0.28.0"
+version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6eda1d2572a15340927a9f7db75ffe74366b645eaf9212015b4a96ad8e9d4c46"
+checksum = "0248b4d784cb4a01472276928977121fa39d977a5bb24793b6b15e64b046df42"
dependencies = [
"parity-scale-codec",
"parking_lot",
- "sp-core 22.0.0",
- "sp-externalities 0.20.0",
- "thiserror",
+ "sp-core",
+ "sp-externalities 0.29.0",
]
[[package]]
name = "sp-metadata-ir"
-version = "0.1.0"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0369e75e418bcfdeede4acb92563ef2d514ad0e7d81c350ba9ae98841a237f3c"
+checksum = "a616fa51350b35326682a472ee8e6ba742fdacb18babac38ecd46b3e05ead869"
dependencies = [
"frame-metadata 16.0.0",
"parity-scale-codec",
"scale-info",
- "sp-std 9.0.0",
]
[[package]]
name = "sp-panic-handler"
-version = "9.0.0"
+version = "13.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57c67eb0a0d11d3017ef43c975068ba76c7b0e83aca1ee3d68ba0ce270ecebe7"
+checksum = "d8f5a17a0a11de029a8b811cb6e8b32ce7e02183cc04a3e965c383246798c416"
dependencies = [
"backtrace",
"lazy_static",
@@ -7125,122 +7131,94 @@ dependencies = [
[[package]]
name = "sp-runtime"
-version = "25.0.0"
+version = "39.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d056e4cccf36a45be5d471b47c09e8be91b825f1d8352f20aa01f9f693176e7"
+checksum = "658f23be7c79a85581029676a73265c107c5469157e3444c8c640fdbaa8bfed0"
dependencies = [
+ "docify",
"either",
"hash256-std-hasher",
"impl-trait-for-tuples",
"log",
+ "num-traits",
"parity-scale-codec",
"paste",
- "rand 0.8.5",
+ "rand",
"scale-info",
"serde",
+ "simple-mermaid",
"sp-application-crypto",
"sp-arithmetic",
- "sp-core 22.0.0",
+ "sp-core",
"sp-io",
- "sp-std 9.0.0",
+ "sp-std 14.0.0",
"sp-weights",
+ "tracing",
]
[[package]]
name = "sp-runtime-interface"
-version = "17.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e676128182f90015e916f806cba635c8141e341e7abbc45d25525472e1bbce8"
-dependencies = [
- "bytes",
- "impl-trait-for-tuples",
- "parity-scale-codec",
- "primitive-types",
- "sp-externalities 0.19.0",
- "sp-runtime-interface-proc-macro 11.0.0",
- "sp-std 8.0.0",
- "sp-storage 13.0.0",
- "sp-tracing 10.0.0",
- "sp-wasm-interface 14.0.0",
- "static_assertions",
-]
-
-[[package]]
-name = "sp-runtime-interface"
-version = "18.0.0"
+version = "28.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf9781c72848efe6750116eb96edaeb105ee7e0bd7f38a4e46371bf810b3db7b"
+checksum = "985eb981f40c689c6a0012c937b68ed58dabb4341d06f2dfe4dfd5ed72fa4017"
dependencies = [
"bytes",
"impl-trait-for-tuples",
"parity-scale-codec",
+ "polkavm-derive",
"primitive-types",
- "sp-externalities 0.20.0",
- "sp-runtime-interface-proc-macro 12.0.0",
- "sp-std 9.0.0",
- "sp-storage 14.0.0",
- "sp-tracing 11.0.0",
- "sp-wasm-interface 15.0.0",
+ "sp-externalities 0.29.0",
+ "sp-runtime-interface-proc-macro",
+ "sp-std 14.0.0",
+ "sp-storage 21.0.0",
+ "sp-tracing 17.0.1",
+ "sp-wasm-interface",
"static_assertions",
]
[[package]]
name = "sp-runtime-interface-proc-macro"
-version = "11.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5d5bd5566fe5633ec48dfa35ab152fd29f8a577c21971e1c6db9f28afb9bbb9"
-dependencies = [
- "Inflector",
- "proc-macro-crate 1.3.1",
- "proc-macro2",
- "quote",
- "syn 2.0.72",
-]
-
-[[package]]
-name = "sp-runtime-interface-proc-macro"
-version = "12.0.0"
+version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7402572a08aa1ae421ea5bab10918764b0ae72301b27710913e5d804862f2448"
+checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294"
dependencies = [
"Inflector",
- "proc-macro-crate 1.3.1",
+ "expander",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "sp-staking"
-version = "20.0.0"
+version = "36.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4883e5d0a533009175746e3c35d44aa031805064153749baefd6cac915e70ba5"
+checksum = "2a73eedb4b85f4cd420d31764827546aa22f82ce1646d0fd258993d051de7a90"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
"scale-info",
"serde",
- "sp-core 22.0.0",
+ "sp-core",
"sp-runtime",
- "sp-std 9.0.0",
]
[[package]]
name = "sp-state-machine"
-version = "0.29.0"
+version = "0.43.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2e84d8ed3acc6aed5a3d5cfd500fb5b99c1e299c86086b2fe82c3e4be93178f"
+checksum = "930104d6ae882626e8880d9b1578da9300655d337a3ffb45e130c608b6c89660"
dependencies = [
"hash-db",
"log",
"parity-scale-codec",
"parking_lot",
- "rand 0.8.5",
+ "rand",
"smallvec",
- "sp-core 22.0.0",
- "sp-externalities 0.20.0",
+ "sp-core",
+ "sp-externalities 0.29.0",
"sp-panic-handler",
- "sp-std 9.0.0",
"sp-trie",
"thiserror",
"tracing",
@@ -7259,32 +7237,37 @@ version = "9.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d5bbc9339227d1b6a9b7ccd9b2920c818653d40eef1512f1e2e824d72e7a336"
+[[package]]
+name = "sp-std"
+version = "14.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834"
+
[[package]]
name = "sp-storage"
-version = "13.0.0"
+version = "14.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94294be83f11d4958cfea89ed5798f0b6605f5defc3a996948848458abbcc18e"
+checksum = "a21245c3a7799ff6d3f1f159b496f9ac72eb32cd6fe68c6f73013155289aa9f1"
dependencies = [
"impl-serde",
"parity-scale-codec",
"ref-cast",
"serde",
- "sp-debug-derive 8.0.0",
- "sp-std 8.0.0",
+ "sp-debug-derive 9.0.0",
+ "sp-std 9.0.0",
]
[[package]]
name = "sp-storage"
-version = "14.0.0"
+version = "21.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a21245c3a7799ff6d3f1f159b496f9ac72eb32cd6fe68c6f73013155289aa9f1"
+checksum = "99c82989b3a4979a7e1ad848aad9f5d0b4388f1f454cc131766526601ab9e8f8"
dependencies = [
"impl-serde",
"parity-scale-codec",
"ref-cast",
"serde",
- "sp-debug-derive 9.0.0",
- "sp-std 9.0.0",
+ "sp-debug-derive 14.0.0",
]
[[package]]
@@ -7297,40 +7280,39 @@ dependencies = [
"sp-std 8.0.0",
"tracing",
"tracing-core",
- "tracing-subscriber",
+ "tracing-subscriber 0.2.25",
]
[[package]]
name = "sp-tracing"
-version = "11.0.0"
+version = "17.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f5ba26db1f7513d5975970d1ba1f0580d7a1b8da8c86ea3f9f0f8dbe2cfa96e"
+checksum = "cf641a1d17268c8fcfdb8e0fa51a79c2d4222f4cfda5f3944dbdbc384dced8d5"
dependencies = [
"parity-scale-codec",
- "sp-std 9.0.0",
"tracing",
"tracing-core",
- "tracing-subscriber",
+ "tracing-subscriber 0.3.18",
]
[[package]]
name = "sp-trie"
-version = "23.0.0"
+version = "37.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf63ea90ffb5d61048d8fb2fac669114dac198fc2739e913e615f0fd2c36c3e7"
+checksum = "6282aef9f4b6ecd95a67a45bcdb67a71f4a4155c09a53c10add4ffe823db18cd"
dependencies = [
"ahash 0.8.11",
"hash-db",
- "hashbrown 0.13.2",
"lazy_static",
"memory-db",
"nohash-hasher",
"parity-scale-codec",
"parking_lot",
+ "rand",
"scale-info",
"schnellru",
- "sp-core 22.0.0",
- "sp-std 9.0.0",
+ "sp-core",
+ "sp-externalities 0.29.0",
"thiserror",
"tracing",
"trie-db",
@@ -7339,57 +7321,44 @@ dependencies = [
[[package]]
name = "sp-version"
-version = "23.0.0"
+version = "37.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccae066042a53a83017a2afeee2fd608efa42b564c1a44ea1260d5a2c264ac66"
+checksum = "d521a405707b5be561367cd3d442ff67588993de24062ce3adefcf8437ee9fe1"
dependencies = [
"impl-serde",
"parity-scale-codec",
"parity-wasm",
"scale-info",
"serde",
- "sp-core-hashing-proc-macro",
+ "sp-crypto-hashing-proc-macro",
"sp-runtime",
- "sp-std 9.0.0",
+ "sp-std 14.0.0",
"sp-version-proc-macro",
"thiserror",
]
[[package]]
name = "sp-version-proc-macro"
-version = "9.0.0"
+version = "14.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07e569853a50ad02a4b45640e7b96206bcb4569bb85ce7cdf8754a207fcfba54"
+checksum = "5aee8f6730641a65fcf0c8f9b1e448af4b3bb083d08058b47528188bccc7b7a7"
dependencies = [
"parity-scale-codec",
"proc-macro2",
"quote",
- "syn 2.0.72",
-]
-
-[[package]]
-name = "sp-wasm-interface"
-version = "14.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a19c122609ca5d8246be6386888596320d03c7bc880959eaa2c36bcd5acd6846"
-dependencies = [
- "impl-trait-for-tuples",
- "parity-scale-codec",
- "sp-std 8.0.0",
+ "syn 2.0.89",
]
[[package]]
name = "sp-wasm-interface"
-version = "15.0.0"
+version = "21.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d07945f592d2792632e6f030108769757e928a0fd78cf8659c9c210a5e341e55"
+checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9"
dependencies = [
"anyhow",
"impl-trait-for-tuples",
"log",
"parity-scale-codec",
- "sp-std 9.0.0",
- "wasmtime",
]
[[package]]
@@ -7405,18 +7374,17 @@ dependencies = [
[[package]]
name = "sp-weights"
-version = "21.0.0"
+version = "31.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b7699b853471c2eb5dc06ea1d8ea847bfa1415371218ebb4c86325c9d0232bc"
+checksum = "93cdaf72a1dad537bbb130ba4d47307ebe5170405280ed1aa31fa712718a400e"
dependencies = [
+ "bounded-collections",
"parity-scale-codec",
"scale-info",
"serde",
"smallvec",
"sp-arithmetic",
- "sp-core 22.0.0",
- "sp-debug-derive 9.0.0",
- "sp-std 9.0.0",
+ "sp-debug-derive 14.0.0",
]
[[package]]
@@ -7437,9 +7405,9 @@ dependencies = [
[[package]]
name = "ss58-registry"
-version = "1.47.0"
+version = "1.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba"
+checksum = "19409f13998e55816d1c728395af0b52ec066206341d939e22e7766df9b494b8"
dependencies = [
"Inflector",
"num-format",
@@ -7456,39 +7424,6 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
-[[package]]
-name = "staking"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
- "staking-io",
-]
-
-[[package]]
-name = "staking-io"
-version = "1.1.0"
-dependencies = [
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "staking-state"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "staking-io",
-]
-
[[package]]
name = "static_assertions"
version = "1.1.0"
@@ -7502,59 +7437,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ceb97b7225c713c2fd4db0153cb6b3cab244eb37900c3f634ed4d43310d8c34"
[[package]]
-name = "strsim"
-version = "0.10.0"
+name = "string-interner"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
-
-[[package]]
-name = "student-nft"
-version = "1.1.0"
+checksum = "1c6a0d765f5807e98a091107bae0a56ea3799f66a5de47b2c84c94a39c09974e"
dependencies = [
- "gclient",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "student-nft-io",
- "tokio",
+ "cfg-if",
+ "hashbrown 0.14.5",
+ "serde",
]
[[package]]
-name = "student-nft-io"
-version = "1.1.0"
+name = "string_cache"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
dependencies = [
- "gmeta",
- "gstd",
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot",
+ "phf_shared",
+ "precomputed-hash",
]
[[package]]
-name = "student-nft-state"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "student-nft-io",
-]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "substrate-bip39"
-version = "0.4.6"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f"
+checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a"
dependencies = [
- "hmac 0.11.0",
- "pbkdf2 0.8.0",
+ "hmac 0.12.1",
+ "pbkdf2",
"schnorrkel 0.11.4",
- "sha2 0.9.9",
+ "sha2 0.10.8",
"zeroize",
]
[[package]]
name = "subtle"
-version = "2.4.1"
+version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "subtle-ng"
@@ -7564,22 +7499,22 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142"
[[package]]
name = "subxt"
-version = "0.32.1"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "588b8ce92699eeb06290f4fb02dad4f7e426c4e6db4d53889c6bcbc808cf24ac"
+checksum = "a160cba1edbf3ec4fbbeaea3f1a185f70448116a6bccc8276bb39adb3b3053bd"
dependencies = [
"async-trait",
- "base58",
- "blake2",
- "derivative",
+ "derive-where",
"either",
"frame-metadata 16.0.0",
"futures",
"hex",
"impl-serde",
- "jsonrpsee 0.20.3",
+ "instant",
+ "jsonrpsee 0.22.5",
"parity-scale-codec",
"primitive-types",
+ "reconnecting-jsonrpsee-ws-client",
"scale-bits",
"scale-decode",
"scale-encode",
@@ -7587,39 +7522,70 @@ dependencies = [
"scale-value",
"serde",
"serde_json",
- "sp-core-hashing 9.0.0",
+ "sp-crypto-hashing",
+ "subxt-core",
"subxt-lightclient",
"subxt-macro",
"subxt-metadata",
"thiserror",
+ "tokio-util",
"tracing",
+ "url",
]
[[package]]
name = "subxt-codegen"
-version = "0.32.1"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98f5a534c8d475919e9c845d51fc2316da4fcadd04fe17552d932d2106de930e"
+checksum = "d703dca0905cc5272d7cc27a4ac5f37dcaae7671acc7fef0200057cc8c317786"
dependencies = [
"frame-metadata 16.0.0",
"heck",
"hex",
- "jsonrpsee 0.20.3",
+ "jsonrpsee 0.22.5",
"parity-scale-codec",
"proc-macro2",
"quote",
"scale-info",
+ "scale-typegen",
"subxt-metadata",
- "syn 2.0.72",
+ "syn 2.0.89",
"thiserror",
"tokio",
]
+[[package]]
+name = "subxt-core"
+version = "0.37.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3af3b36405538a36b424d229dc908d1396ceb0994c90825ce928709eac1a159a"
+dependencies = [
+ "base58",
+ "blake2",
+ "derive-where",
+ "frame-metadata 16.0.0",
+ "hashbrown 0.14.5",
+ "hex",
+ "impl-serde",
+ "parity-scale-codec",
+ "primitive-types",
+ "scale-bits",
+ "scale-decode",
+ "scale-encode",
+ "scale-info",
+ "scale-value",
+ "serde",
+ "serde_json",
+ "sp-crypto-hashing",
+ "subxt-metadata",
+ "tracing",
+]
+
[[package]]
name = "subxt-lightclient"
-version = "0.32.1"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10fd0ac9b091211f962b6ae19e26cd08e0b86efa064dfb7fac69c8f79f122329"
+checksum = "9d9406fbdb9548c110803cb8afa750f8b911d51eefdf95474b11319591d225d9"
dependencies = [
"futures",
"futures-util",
@@ -7634,85 +7600,30 @@ dependencies = [
[[package]]
name = "subxt-macro"
-version = "0.32.1"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12e8be9ab6fe88b8c13edbe15911e148482cfb905a8b8d5b8d766a64c54be0bd"
+checksum = "1c195f803d70687e409aba9be6c87115b5da8952cd83c4d13f2e043239818fcd"
dependencies = [
- "darling 0.20.8",
+ "darling 0.20.10",
+ "parity-scale-codec",
"proc-macro-error",
+ "quote",
+ "scale-typegen",
"subxt-codegen",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "subxt-metadata"
-version = "0.32.1"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6898275765d36a37e5ef564358e0341cf41b5f3a91683d7d8b859381b65ac8a"
+checksum = "738be5890fdeff899bbffff4d9c0f244fe2a952fb861301b937e3aa40ebb55da"
dependencies = [
"frame-metadata 16.0.0",
+ "hashbrown 0.14.5",
"parity-scale-codec",
"scale-info",
- "sp-core-hashing 9.0.0",
- "thiserror",
-]
-
-[[package]]
-name = "supply-chain"
-version = "1.1.0"
-dependencies = [
- "gclient",
- "gear-lib-old",
- "gear-wasm-builder",
- "gstd",
- "gtest",
- "non-fungible-token",
- "non-fungible-token-io",
- "non-fungible-token-state",
- "sharded-fungible-token",
- "sharded-fungible-token-io",
- "sharded-fungible-token-logic",
- "sharded-fungible-token-storage",
- "supply-chain-deploy",
- "supply-chain-io",
- "supply-chain-state",
- "tokio",
-]
-
-[[package]]
-name = "supply-chain-deploy"
-version = "1.1.0"
-dependencies = [
- "clap",
- "gclient",
- "gstd",
- "non-fungible-token-io",
- "primitive-types",
- "sharded-fungible-token-io",
- "sp-core-hashing 10.0.0",
- "supply-chain",
- "supply-chain-io",
- "supply-chain-state",
- "tokio",
-]
-
-[[package]]
-name = "supply-chain-io"
-version = "1.1.0"
-dependencies = [
- "gear-lib-old",
- "gmeta",
- "gstd",
-]
-
-[[package]]
-name = "supply-chain-state"
-version = "1.1.0"
-dependencies = [
- "gear-wasm-builder",
- "gmeta",
- "gstd",
- "supply-chain-io",
+ "sp-crypto-hashing",
]
[[package]]
@@ -7728,9 +7639,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.72"
+version = "2.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af"
+checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e"
dependencies = [
"proc-macro2",
"quote",
@@ -7742,18 +7653,21 @@ name = "syndote"
version = "1.1.0"
dependencies = [
"gear-wasm-builder",
- "gstd",
- "gtest",
- "syndote-io",
- "syndote-player",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
+ "syndote-app",
]
[[package]]
-name = "syndote-io"
+name = "syndote-app"
version = "1.1.0"
dependencies = [
- "gmeta",
+ "gclient",
"gstd",
+ "sails-rs",
+ "syndote",
+ "tokio",
]
[[package]]
@@ -7761,18 +7675,19 @@ name = "syndote-player"
version = "1.1.0"
dependencies = [
"gear-wasm-builder",
- "gstd",
- "syndote-io",
- "syndote-player-io",
+ "player-app",
+ "sails-idl-gen",
]
[[package]]
-name = "syndote-player-io"
-version = "1.1.0"
+name = "synstructure"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
- "gmeta",
- "gstd",
- "syndote-io",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
]
[[package]]
@@ -7843,20 +7758,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "target-lexicon"
-version = "0.12.14"
+version = "0.12.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tempfile"
-version = "3.10.1"
+version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
+checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
dependencies = [
"cfg-if",
- "fastrand 2.1.0",
- "rustix 0.38.34",
- "windows-sys 0.52.0",
+ "fastrand",
+ "once_cell",
+ "rustix 0.38.41",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -7880,6 +7796,17 @@ dependencies = [
"scale-info",
]
+[[package]]
+name = "term"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
+dependencies = [
+ "dirs-next",
+ "rustversion",
+ "winapi",
+]
+
[[package]]
name = "termcolor"
version = "1.4.1"
@@ -7889,44 +7816,50 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "termtree"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
+
[[package]]
name = "thiserror"
-version = "1.0.63"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
dependencies = [
"thiserror-impl",
]
[[package]]
-name = "thiserror-core"
-version = "1.0.50"
+name = "thiserror-impl"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
- "thiserror-core-impl",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
]
[[package]]
-name = "thiserror-core-impl"
-version = "1.0.50"
+name = "thiserror-impl-no-std"
+version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04"
+checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 1.0.109",
]
[[package]]
-name = "thiserror-impl"
-version = "1.0.63"
+name = "thiserror-no-std"
+version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
+checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea"
dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.72",
+ "thiserror-impl-no-std",
]
[[package]]
@@ -7943,45 +7876,54 @@ dependencies = [
name = "tic-tac-toe"
version = "1.1.0"
dependencies = [
- "gclient",
- "gear-core",
"gear-wasm-builder",
- "gmeta",
- "gstd",
- "gtest",
- "hex",
- "tic-tac-toe-io",
- "tokio",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
+ "tic-tac-toe-app",
]
[[package]]
-name = "tic-tac-toe-io"
+name = "tic-tac-toe-app"
version = "1.1.0"
dependencies = [
- "gmeta",
+ "gclient",
"gstd",
- "parity-scale-codec",
- "primitive-types",
- "scale-info",
+ "sails-rs",
+ "schnorrkel 0.10.2",
+ "tic-tac-toe",
+ "tokio",
]
[[package]]
-name = "tiny-bip39"
-version = "1.0.0"
+name = "time"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
- "anyhow",
- "hmac 0.12.1",
- "once_cell",
- "pbkdf2 0.11.0",
- "rand 0.8.5",
- "rustc-hash",
- "sha2 0.10.8",
- "thiserror",
- "unicode-normalization",
- "wasm-bindgen",
- "zeroize",
+ "deranged",
+ "itoa",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "time-macros"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
+dependencies = [
+ "num-conv",
+ "time-core",
]
[[package]]
@@ -7993,11 +7935,21 @@ dependencies = [
"crunchy",
]
+[[package]]
+name = "tinystr"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
[[package]]
name = "tinyvec"
-version = "1.6.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938"
dependencies = [
"tinyvec_macros",
]
@@ -8010,47 +7962,68 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.37.0"
+version = "1.41.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787"
+checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
dependencies = [
"backtrace",
"bytes",
"libc",
"mio",
- "num_cpus",
"pin-project-lite",
- "socket2 0.5.7",
+ "socket2",
"tokio-macros",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
name = "tokio-macros"
-version = "2.2.0"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.24.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
+dependencies = [
+ "rustls 0.21.12",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
+checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.72",
+ "rustls 0.22.4",
+ "rustls-pki-types",
+ "tokio",
]
[[package]]
name = "tokio-rustls"
-version = "0.24.1"
+version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
+checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
dependencies = [
- "rustls",
+ "rustls 0.23.19",
+ "rustls-pki-types",
"tokio",
]
[[package]]
name = "tokio-stream"
-version = "0.1.15"
+version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af"
+checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
dependencies = [
"futures-core",
"pin-project-lite",
@@ -8059,9 +8032,9 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.11"
+version = "0.7.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1"
+checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a"
dependencies = [
"bytes",
"futures-core",
@@ -8073,21 +8046,21 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.8.15"
+version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28"
+checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
- "toml_edit 0.22.16",
+ "toml_edit 0.22.22",
]
[[package]]
name = "toml_datetime"
-version = "0.6.6"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
+checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
"serde",
]
@@ -8098,33 +8071,22 @@ version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
- "indexmap 2.2.6",
- "toml_datetime",
- "winnow 0.5.40",
-]
-
-[[package]]
-name = "toml_edit"
-version = "0.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
-dependencies = [
- "indexmap 2.2.6",
+ "indexmap 2.6.0",
"toml_datetime",
"winnow 0.5.40",
]
[[package]]
name = "toml_edit"
-version = "0.22.16"
+version = "0.22.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788"
+checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
dependencies = [
- "indexmap 2.2.6",
+ "indexmap 2.6.0",
"serde",
"serde_spanned",
"toml_datetime",
- "winnow 0.6.8",
+ "winnow 0.6.20",
]
[[package]]
@@ -8144,15 +8106,15 @@ dependencies = [
[[package]]
name = "tower-layer"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
+checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
[[package]]
name = "tower-service"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
@@ -8168,20 +8130,20 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.27"
+version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
]
[[package]]
name = "tracing-core"
-version = "0.1.32"
+version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
dependencies = [
"once_cell",
"valuable",
@@ -8198,6 +8160,17 @@ dependencies = [
"tracing-core",
]
+[[package]]
+name = "tracing-log"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
+dependencies = [
+ "log",
+ "once_cell",
+ "tracing-core",
+]
+
[[package]]
name = "tracing-serde"
version = "0.1.3"
@@ -8217,7 +8190,7 @@ dependencies = [
"ansi_term",
"chrono",
"lazy_static",
- "matchers",
+ "matchers 0.0.1",
"regex",
"serde",
"serde_json",
@@ -8226,18 +8199,36 @@ dependencies = [
"thread_local",
"tracing",
"tracing-core",
- "tracing-log",
+ "tracing-log 0.1.4",
"tracing-serde",
]
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
+dependencies = [
+ "matchers 0.1.0",
+ "nu-ansi-term",
+ "once_cell",
+ "regex",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "time",
+ "tracing",
+ "tracing-core",
+ "tracing-log 0.2.0",
+]
+
[[package]]
name = "trie-db"
-version = "0.27.1"
+version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85"
+checksum = "0c992b4f40c234a074d48a757efeabb1a6be88af84c0c23f7ca158950cb0ae7f"
dependencies = [
"hash-db",
- "hashbrown 0.13.2",
"log",
"rustc-hex",
"smallvec",
@@ -8272,7 +8263,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if",
"digest 0.10.7",
- "rand 0.8.5",
+ "rand",
"static_assertions",
]
@@ -8282,6 +8273,12 @@ version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+[[package]]
+name = "ucd-trie"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
+
[[package]]
name = "uint"
version = "0.9.5"
@@ -8300,41 +8297,35 @@ version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c8a2469e56e6e5095c82ccd3afb98dad95f7af7929aab6d8ba8d6e0f73657da"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
]
-[[package]]
-name = "unicode-bidi"
-version = "0.3.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
-
[[package]]
name = "unicode-ident"
-version = "1.0.12"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "unicode-normalization"
-version = "0.1.23"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
+checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
dependencies = [
"tinyvec",
]
[[package]]
-name = "unicode-width"
-version = "0.1.12"
+name = "unicode-segmentation"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6"
+checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
[[package]]
name = "unicode-xid"
-version = "0.2.4"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
[[package]]
name = "universal-hash"
@@ -8354,20 +8345,38 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.5.0"
+version = "2.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
+checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
dependencies = [
"form_urlencoded",
"idna",
"percent-encoding",
]
+[[package]]
+name = "utf16_iter"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
+
+[[package]]
+name = "utf8_iter"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
[[package]]
name = "uuid"
-version = "1.8.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0"
+checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
[[package]]
name = "valuable"
@@ -8379,56 +8388,91 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
name = "vara-man"
version = "1.1.0"
dependencies = [
- "blake2-rfc",
- "fungible-token",
- "fungible-token-io",
- "gclient",
- "gear-core",
"gear-wasm-builder",
+ "sails-client-gen",
+ "sails-idl-gen",
+ "sails-rs",
+ "vara-man-app",
+]
+
+[[package]]
+name = "vara-man-app"
+version = "1.1.0"
+dependencies = [
+ "extended-vft",
+ "extended-vft-client",
+ "gclient",
"gstd",
"gtest",
- "hex",
- "sp-core 21.0.0",
+ "sails-rs",
+ "schnorrkel 0.10.2",
"tokio",
- "vara-man-io",
+ "vara-man",
]
[[package]]
-name = "vara-man-io"
+name = "varatube"
version = "1.1.0"
dependencies = [
- "gmeta",
- "gstd",
- "parity-scale-codec",
- "scale-info",
+ "gear-wasm-builder",
+ "sails-idl-gen",
+ "varatube-app",
]
[[package]]
-name = "varatube"
+name = "varatube-app"
version = "1.1.0"
dependencies = [
- "fungible-token",
- "fungible-token-io",
+ "extended-vft-client",
+ "gclient",
"gear-core",
- "gear-wasm-builder",
"gstd",
"gtest",
- "varatube-io",
+ "sails-rs",
+ "tokio",
]
[[package]]
-name = "varatube-io"
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "vft-service"
version = "1.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
dependencies = [
- "gmeta",
"gstd",
+ "log",
+ "parity-scale-codec",
+ "sails-rs",
+ "scale-info",
]
[[package]]
-name = "version_check"
-version = "0.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+name = "vmt-service"
+version = "1.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
+dependencies = [
+ "gstd",
+ "log",
+ "parity-scale-codec",
+ "sails-rs",
+ "scale-info",
+]
+
+[[package]]
+name = "vnft-service"
+version = "1.1.0"
+source = "git+https://github.com/gear-foundation/standards/#22acb3079099e7a0dee3920534dd0eeb13b41d84"
+dependencies = [
+ "gstd",
+ "log",
+ "parity-scale-codec",
+ "sails-rs",
+ "scale-info",
+]
[[package]]
name = "w3bstreaming"
@@ -8450,6 +8494,30 @@ dependencies = [
"scale-info",
]
+[[package]]
+name = "w3f-bls"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70a3028804c8bbae2a97a15b71ffc0e308c4b01a520994aafa77d56e94e19024"
+dependencies = [
+ "ark-bls12-377",
+ "ark-bls12-381",
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
+ "ark-serialize-derive",
+ "arrayref",
+ "constcat",
+ "digest 0.10.7",
+ "rand",
+ "rand_chacha",
+ "rand_core",
+ "sha2 0.10.8",
+ "sha3",
+ "thiserror",
+ "zeroize",
+]
+
[[package]]
name = "wabt"
version = "0.10.0"
@@ -8475,9 +8543,19 @@ dependencies = [
[[package]]
name = "waker-fn"
-version = "1.1.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690"
+checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7"
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
[[package]]
name = "want"
@@ -8489,10 +8567,21 @@ dependencies = [
]
[[package]]
-name = "wasi"
-version = "0.9.0+wasi-snapshot-preview1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+name = "warrior-app"
+version = "0.1.0"
+dependencies = [
+ "sails-rs",
+]
+
+[[package]]
+name = "warrior-wasm"
+version = "1.1.0"
+dependencies = [
+ "gear-wasm-builder",
+ "sails-idl-gen",
+ "sails-rs",
+ "warrior-app",
+]
[[package]]
name = "wasi"
@@ -8502,328 +8591,205 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.92"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
+checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
dependencies = [
"cfg-if",
+ "once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.92"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
+checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
dependencies = [
"bumpalo",
"log",
"once_cell",
- "proc-macro2",
- "quote",
- "syn 2.0.72",
- "wasm-bindgen-shared",
-]
-
-[[package]]
-name = "wasm-bindgen-macro"
-version = "0.2.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
-dependencies = [
- "quote",
- "wasm-bindgen-macro-support",
-]
-
-[[package]]
-name = "wasm-bindgen-macro-support"
-version = "0.2.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.72",
- "wasm-bindgen-backend",
- "wasm-bindgen-shared",
-]
-
-[[package]]
-name = "wasm-bindgen-shared"
-version = "0.2.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
-
-[[package]]
-name = "wasm-encoder"
-version = "0.207.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d996306fb3aeaee0d9157adbe2f670df0236caf19f6728b221e92d0f27b3fe17"
-dependencies = [
- "leb128",
-]
-
-[[package]]
-name = "wasmer"
-version = "2.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf"
-dependencies = [
- "cfg-if",
- "indexmap 1.9.3",
- "js-sys",
- "loupe",
- "more-asserts",
- "target-lexicon",
- "thiserror",
- "wasm-bindgen",
- "wasmer-artifact",
- "wasmer-compiler",
- "wasmer-compiler-cranelift",
- "wasmer-compiler-singlepass",
- "wasmer-derive",
- "wasmer-engine",
- "wasmer-engine-dylib",
- "wasmer-engine-universal",
- "wasmer-types",
- "wasmer-vm",
- "wat",
- "winapi",
-]
-
-[[package]]
-name = "wasmer-artifact"
-version = "2.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325"
-dependencies = [
- "enumset",
- "loupe",
- "thiserror",
- "wasmer-compiler",
- "wasmer-types",
-]
-
-[[package]]
-name = "wasmer-cache"
-version = "2.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0def391ee1631deac5ac1e6ce919c07a5ccb936ad0fd44708cdc2365c49561a4"
-dependencies = [
- "blake3",
- "hex",
- "thiserror",
- "wasmer",
-]
-
-[[package]]
-name = "wasmer-compiler"
-version = "2.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c"
-dependencies = [
- "enumset",
- "loupe",
- "rkyv",
- "serde",
- "serde_bytes",
- "smallvec",
- "target-lexicon",
- "thiserror",
- "wasmer-types",
- "wasmparser 0.83.0",
-]
-
-[[package]]
-name = "wasmer-compiler-cranelift"
-version = "2.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0"
-dependencies = [
- "cranelift-codegen",
- "cranelift-entity 0.82.3",
- "cranelift-frontend",
- "gimli 0.26.2",
- "loupe",
- "more-asserts",
- "rayon",
- "smallvec",
- "target-lexicon",
- "tracing",
- "wasmer-compiler",
- "wasmer-types",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+ "wasm-bindgen-shared",
]
[[package]]
-name = "wasmer-compiler-singlepass"
-version = "2.3.0"
+name = "wasm-bindgen-macro"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e"
+checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
dependencies = [
- "byteorder",
- "dynasm",
- "dynasmrt",
- "gimli 0.26.2",
- "lazy_static",
- "loupe",
- "more-asserts",
- "rayon",
- "smallvec",
- "wasmer-compiler",
- "wasmer-types",
+ "quote",
+ "wasm-bindgen-macro-support",
]
[[package]]
-name = "wasmer-derive"
-version = "2.3.0"
+name = "wasm-bindgen-macro-support"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51"
+checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
- "proc-macro-error",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.89",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
]
[[package]]
-name = "wasmer-engine"
-version = "2.3.0"
+name = "wasm-bindgen-shared"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
+
+[[package]]
+name = "wasmer"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45"
+checksum = "2d920d06243e9f456c336c428a34560357dedf59d9febaae14f1995ac120cff6"
dependencies = [
- "backtrace",
- "enumset",
- "lazy_static",
- "loupe",
- "memmap2",
+ "bytes",
+ "cfg-if",
+ "derivative",
+ "indexmap 1.9.3",
+ "js-sys",
"more-asserts",
"rustc-demangle",
"serde",
- "serde_bytes",
+ "serde-wasm-bindgen",
+ "shared-buffer",
"target-lexicon",
"thiserror",
- "wasmer-artifact",
+ "tracing",
+ "wasm-bindgen",
"wasmer-compiler",
+ "wasmer-compiler-singlepass",
+ "wasmer-derive",
"wasmer-types",
"wasmer-vm",
+ "windows-sys 0.59.0",
]
[[package]]
-name = "wasmer-engine-dylib"
-version = "2.3.0"
+name = "wasmer-cache"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53"
+checksum = "4e2aa507d7ab1d7f6038f60ca107bc4629c5dbf3a0e18427091b7576b0ffbbd9"
dependencies = [
- "cfg-if",
- "enum-iterator 0.7.0",
- "enumset",
- "leb128",
- "libloading",
- "loupe",
- "object 0.28.4",
- "rkyv",
- "serde",
- "tempfile",
- "tracing",
- "wasmer-artifact",
- "wasmer-compiler",
- "wasmer-engine",
- "wasmer-object",
- "wasmer-types",
- "wasmer-vm",
- "which",
+ "blake3",
+ "hex",
+ "thiserror",
+ "wasmer",
]
[[package]]
-name = "wasmer-engine-universal"
-version = "2.3.0"
+name = "wasmer-compiler"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15"
+checksum = "0e01832173aa52345e480965f18c638a8a5a9e5e4d85a48675bdf1964147dc7f"
dependencies = [
+ "backtrace",
+ "bytes",
"cfg-if",
+ "enum-iterator 0.7.0",
"enumset",
+ "lazy_static",
"leb128",
- "loupe",
+ "libc",
+ "memmap2 0.6.2",
+ "more-asserts",
"region",
"rkyv",
- "wasmer-compiler",
- "wasmer-engine",
- "wasmer-engine-universal-artifact",
+ "self_cell",
+ "shared-buffer",
+ "smallvec",
+ "thiserror",
"wasmer-types",
"wasmer-vm",
- "winapi",
+ "wasmparser 0.121.2",
+ "windows-sys 0.59.0",
+ "xxhash-rust",
]
[[package]]
-name = "wasmer-engine-universal-artifact"
-version = "2.3.0"
+name = "wasmer-compiler-singlepass"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41"
+checksum = "a2b111c55d0b8a30dba67afe8766c56b53f0055653f0bb14b1a337056263ae48"
dependencies = [
- "enum-iterator 0.7.0",
+ "byteorder",
+ "dynasm",
+ "dynasmrt",
"enumset",
- "loupe",
- "rkyv",
- "thiserror",
- "wasmer-artifact",
+ "gimli 0.26.2",
+ "lazy_static",
+ "more-asserts",
+ "rayon",
+ "smallvec",
"wasmer-compiler",
"wasmer-types",
]
[[package]]
-name = "wasmer-object"
-version = "2.3.0"
+name = "wasmer-derive"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b"
+checksum = "9c5875633aea92153b6a561cb07363785ca9e07792ca6cd7c1cc371761001d8f"
dependencies = [
- "object 0.28.4",
- "thiserror",
- "wasmer-compiler",
- "wasmer-types",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
]
[[package]]
name = "wasmer-types"
-version = "2.3.0"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f"
+checksum = "8fb32f0d231b591e4c8a65e81d4647fa3180496d71a123d4948dba8551bba9c2"
dependencies = [
- "backtrace",
+ "bytecheck",
"enum-iterator 0.7.0",
+ "enumset",
+ "getrandom",
+ "hex",
"indexmap 1.9.3",
- "loupe",
"more-asserts",
"rkyv",
- "serde",
+ "sha2 0.10.8",
+ "target-lexicon",
"thiserror",
+ "xxhash-rust",
]
[[package]]
name = "wasmer-vm"
-version = "2.3.0"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd"
+checksum = "e38e9301f5bb9f18da9cda4002d74d2cb6ac1f36dcf919fd77f91fca321fb1e5"
dependencies = [
"backtrace",
"cc",
"cfg-if",
"corosensei",
+ "crossbeam-queue",
+ "dashmap",
+ "derivative",
"enum-iterator 0.7.0",
+ "fnv",
"indexmap 1.9.3",
"lazy_static",
"libc",
- "loupe",
- "mach",
- "memoffset 0.6.5",
+ "mach2",
+ "memoffset 0.9.1",
"more-asserts",
"region",
- "rkyv",
"scopeguard",
- "serde",
"thiserror",
- "wasmer-artifact",
"wasmer-types",
- "winapi",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -8839,15 +8805,30 @@ dependencies = [
[[package]]
name = "wasmi"
-version = "0.30.0"
+version = "0.31.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4"
+checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7"
dependencies = [
- "intx",
"smallvec",
"spin",
"wasmi_arena",
- "wasmi_core 0.12.0",
+ "wasmi_core 0.13.0",
+ "wasmparser-nostd",
+]
+
+[[package]]
+name = "wasmi"
+version = "0.38.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b07e84e3bcdab2f4301827623260ada2557596ca462f7470b60f5182a25270b1"
+dependencies = [
+ "arrayvec 0.7.6",
+ "multi-stash",
+ "smallvec",
+ "spin",
+ "wasmi_collections",
+ "wasmi_core 0.38.0",
+ "wasmi_ir",
"wasmparser-nostd",
]
@@ -8866,6 +8847,17 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073"
+[[package]]
+name = "wasmi_collections"
+version = "0.38.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d0fd5f4f2c4fe0c98554bb7293108ed2b1d0c124dce0974f999de7d517d37bc"
+dependencies = [
+ "ahash 0.8.11",
+ "hashbrown 0.14.5",
+ "string-interner",
+]
+
[[package]]
name = "wasmi_core"
version = "0.2.1"
@@ -8877,14 +8869,13 @@ dependencies = [
"memory_units",
"num-rational",
"num-traits",
- "region",
]
[[package]]
name = "wasmi_core"
-version = "0.12.0"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "624e6333e861ef49095d2d678b76ebf30b06bf37effca845be7e5b87c90071b7"
+checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a"
dependencies = [
"downcast-rs",
"libm",
@@ -8893,10 +8884,25 @@ dependencies = [
]
[[package]]
-name = "wasmparser"
-version = "0.83.0"
+name = "wasmi_core"
+version = "0.38.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76a5f7bbd933a0fb3bac6c541f8bd90c0c8adcd91bb3ac088a2088995325b3d9"
+dependencies = [
+ "downcast-rs",
+ "libm",
+ "num-traits",
+ "paste",
+]
+
+[[package]]
+name = "wasmi_ir"
+version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a"
+checksum = "5a3345445247388df2b5b35250a30c9209c27c8d2c6db1bf4c89b65636264bf9"
+dependencies = [
+ "wasmi_core 0.38.0",
+]
[[package]]
name = "wasmparser"
@@ -8908,6 +8914,17 @@ dependencies = [
"url",
]
+[[package]]
+name = "wasmparser"
+version = "0.121.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab"
+dependencies = [
+ "bitflags 2.6.0",
+ "indexmap 2.6.0",
+ "semver",
+]
+
[[package]]
name = "wasmparser-nostd"
version = "0.100.2"
@@ -8958,7 +8975,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949"
dependencies = [
"anyhow",
- "cranelift-entity 0.95.1",
+ "cranelift-entity",
"gimli 0.27.3",
"indexmap 1.9.3",
"log",
@@ -9029,7 +9046,7 @@ dependencies = [
"memfd",
"memoffset 0.8.0",
"paste",
- "rand 0.8.5",
+ "rand",
"rustix 0.36.17",
"wasmtime-asm-macros",
"wasmtime-environ",
@@ -9043,40 +9060,21 @@ version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f"
dependencies = [
- "cranelift-entity 0.95.1",
+ "cranelift-entity",
"serde",
"thiserror",
"wasmparser 0.102.0",
]
[[package]]
-name = "wast"
-version = "207.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e40be9fd494bfa501309487d2dc0b3f229be6842464ecbdc54eac2679c84c93"
-dependencies = [
- "bumpalo",
- "leb128",
- "memchr",
- "unicode-width",
- "wasm-encoder",
-]
-
-[[package]]
-name = "wat"
-version = "1.207.0"
+name = "webpki-roots"
+version = "0.26.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8eb2b15e2d5f300f5e1209e7dc237f2549edbd4203655b6c6cab5cf180561ee7"
+checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
dependencies = [
- "wast",
+ "rustls-pki-types",
]
-[[package]]
-name = "webpki-roots"
-version = "0.25.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1"
-
[[package]]
name = "which"
version = "4.4.2"
@@ -9086,7 +9084,7 @@ dependencies = [
"either",
"home",
"once_cell",
- "rustix 0.38.34",
+ "rustix 0.38.41",
]
[[package]]
@@ -9107,11 +9105,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.8"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -9126,7 +9124,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -9166,7 +9164,16 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets 0.52.6",
]
[[package]]
@@ -9201,18 +9208,18 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
- "windows_aarch64_gnullvm 0.52.5",
- "windows_aarch64_msvc 0.52.5",
- "windows_i686_gnu 0.52.5",
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
- "windows_i686_msvc 0.52.5",
- "windows_x86_64_gnu 0.52.5",
- "windows_x86_64_gnullvm 0.52.5",
- "windows_x86_64_msvc 0.52.5",
+ "windows_i686_msvc 0.52.6",
+ "windows_x86_64_gnu 0.52.6",
+ "windows_x86_64_gnullvm 0.52.6",
+ "windows_x86_64_msvc 0.52.6",
]
[[package]]
@@ -9229,9 +9236,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
@@ -9253,9 +9260,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
@@ -9277,15 +9284,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
@@ -9307,9 +9314,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
@@ -9331,9 +9338,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
@@ -9349,9 +9356,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
@@ -9373,9 +9380,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
@@ -9388,13 +9395,25 @@ dependencies = [
[[package]]
name = "winnow"
-version = "0.6.8"
+version = "0.6.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d"
+checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
dependencies = [
"memchr",
]
+[[package]]
+name = "write16"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
+
+[[package]]
+name = "writeable"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
+
[[package]]
name = "wyz"
version = "0.5.1"
@@ -9405,59 +9424,100 @@ dependencies = [
]
[[package]]
-name = "xshell"
-version = "0.2.6"
+name = "x25519-dalek"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6db0ab86eae739efd1b054a8d3d16041914030ac4e01cd1dca0cf252fd8b6437"
+checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277"
dependencies = [
- "xshell-macros",
+ "curve25519-dalek",
+ "rand_core",
+ "serde",
+ "zeroize",
]
[[package]]
-name = "xshell-macros"
-version = "0.2.6"
+name = "xxhash-rust"
+version = "0.8.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852"
+checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984"
[[package]]
-name = "xtask"
-version = "1.1.0"
+name = "yap"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf"
+
+[[package]]
+name = "yoke"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
dependencies = [
- "anyhow",
- "xshell",
+ "serde",
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
]
[[package]]
-name = "yap"
-version = "0.11.0"
+name = "yoke-derive"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf"
+checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+ "synstructure",
+]
[[package]]
name = "zerocopy"
-version = "0.7.34"
+version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
+ "byteorder",
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.7.34"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
+checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
+ "synstructure",
]
[[package]]
name = "zeroize"
-version = "1.7.0"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
dependencies = [
"zeroize_derive",
]
@@ -9470,5 +9530,55 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.72",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "zerovec"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "zk-battleship"
+version = "1.1.0"
+dependencies = [
+ "gear-wasm-builder",
+ "sails-idl-gen",
+ "zk-battleship-app",
+]
+
+[[package]]
+name = "zk-battleship-app"
+version = "1.1.0"
+dependencies = [
+ "ark-groth16",
+ "ark-std",
+ "env_logger 0.11.5",
+ "gbuiltin-bls381",
+ "gclient",
+ "gear-core",
+ "gstd",
+ "gtest",
+ "hex-literal",
+ "primitive-types",
+ "sails-rs",
+ "schnorrkel 0.10.2",
+ "tokio",
]
diff --git a/contracts/Cargo.toml b/contracts/Cargo.toml
index 61f4a5c4c..9c5509241 100644
--- a/contracts/Cargo.toml
+++ b/contracts/Cargo.toml
@@ -3,103 +3,39 @@ resolver = "2"
# Keep in the lexicographic order!
# Remove a member if it's used as a dependency in the workspace.
members = [
- "auto-changed-nft",
- "auto-changed-nft/state",
+ "battle",
+ "battle/warrior/wasm",
"battleship",
- "car-races",
- "concert",
- "crowdsale",
- "crowdsale/state",
- "dao",
- "dao/state",
- "dao-light",
- "dao-light/state",
- "decentralized-git",
- "decentralized-git/master",
- "decentralized-git/master/state",
- "decentralized-git/state",
- "decentralized-git/user",
- "decentralized-git/user/state",
- "dex",
- "dex/factory",
- "dex/factory/state",
- "dex/state",
- "dutch-auction",
- "dutch-auction/state",
+ "car-races/app",
+ "car-races/car-1",
+ "car-races/car-2",
+ "car-races/car-3",
+ "car-races/wasm",
+ "concert/wasm",
"dynamic-nft",
- "dynamic-nft/state",
- "escrow",
- "escrow/state",
- "feeds",
- "feeds/channel",
- "feeds/channel/state",
- "feeds/state",
- "fungible-token",
- "fungible-token/state",
- "galactic-express",
- "game-of-chance",
- "horse-races",
- "horse-races/state",
- "identity",
- "identity/state",
- "multi-token",
+ "galactic-express/wasm",
"multisig-wallet",
- "multisig-wallet/state",
- "nft",
- "nft-marketplace",
- "nft-marketplace/state",
- "nft-master",
- "nft-master/state",
- "nft-pixelboard",
- "nft-pixelboard/state",
- "non-fungible-token",
- "non-fungible-token/state",
- "on-chain-nft",
- "on-chain-nft/state",
"oracle",
"oracle/state",
"oracle/randomness",
"oracle/randomness/state",
- "ping",
- "ping/state",
- "rentable-nft",
- "rentable-nft/state",
+ "ping-pong",
"rmrk",
"rmrk/catalog",
"rmrk/resource",
"rmrk/state",
- "rock-paper-scissors",
- "rock-paper-scissors/state",
- "roll-the-dice",
- "roll-the-dice/state",
- "sharded-fungible-token",
- "sharded-fungible-token/logic",
- "sharded-fungible-token/storage",
- "sharded-multi-token",
- "sharded-multi-token/logic",
- "sharded-multi-token/storage",
- "staking",
- "staking/state",
- "student-nft",
- "student-nft/state",
- "supply-chain",
- "supply-chain/state",
- "syndote",
- "syndote/player",
+ "syndote/wasm",
+ "syndote/player/wasm",
"tamagotchi",
"tamagotchi/state",
"tamagotchi-battle",
"tamagotchi-battle/state",
"tequila-train",
- "tic-tac-toe",
- "vara-man",
- "varatube",
+ "varatube/wasm",
+ "tic-tac-toe/wasm",
+ "vara-man/wasm",
"w3bstreaming",
-
- # Noncontract crates
-
- "gear-lib",
- "xtask",
+ "zk-battleship/wasm",
]
[workspace.package]
@@ -116,117 +52,59 @@ publish = false
# Keep in the lexicographic order!
battleship-bot.path = "battleship/bot"
-dex-factory.path = "dex/factory"
-feeds-channel.path = "feeds/channel"
-fungible-token.path = "fungible-token"
-multi-token.path = "multi-token"
-nft.path = "nft"
-non-fungible-token.path = "non-fungible-token"
oracle.path = "oracle"
oracle-randomness.path = "oracle/randomness"
rmrk-catalog.path = "rmrk/catalog"
-sharded-fungible-token.path = "sharded-fungible-token"
-sharded-fungible-token-logic.path = "sharded-fungible-token/logic"
-sharded-fungible-token-storage.path = "sharded-fungible-token/storage"
-sharded-multi-token-logic.path = "sharded-multi-token/logic"
-sharded-multi-token-storage.path = "sharded-multi-token/storage"
-supply-chain.path = "supply-chain"
syndote-player.path = "syndote/player"
tamagotchi.path = "tamagotchi"
# Local states
# Keep in the lexicographic order!
-crowdsale-state.path = "crowdsale/state"
-dex-factory-state.path = "dex/factory/state"
-dex-state.path = "dex/state"
-horse-races-state.path = "horse-races/state"
-identity-state.path = "identity/state"
-non-fungible-token-state.path = "non-fungible-token/state"
-on-chain-nft-state.path = "on-chain-nft/state"
rmrk-state.path = "rmrk/state"
-roll-the-dice-state.path = "roll-the-dice/state"
-supply-chain-state.path = "supply-chain/state"
tamagotchi-battle-state.path = "tamagotchi-battle/state"
# Local IO-crates
# Keep in the lexicographic order!
-auto-changed-nft-io.path = "auto-changed-nft/io"
battleship-io.path = "battleship/io"
car-races-io.path = "car-races/io"
-concert-io.path = "concert/io"
-crowdsale-io.path = "crowdsale/io"
-dao-io.path = "dao/io"
-dao-light-io.path = "dao-light/io"
-decentralized-git-io.path = "decentralized-git/io"
-decentralized-git-master-io.path = "decentralized-git/master/io"
-decentralized-git-user-io.path = "decentralized-git/user/io"
-dex-factory-io.path = "dex/factory/io"
-dex-io.path = "dex/io"
-dutch-auction-io.path = "dutch-auction/io"
-dynamic-nft-io.path = "dynamic-nft/io"
-escrow-io.path = "escrow/io"
-feeds-channel-io.path = "feeds/channel/io"
-feeds-io.path = "feeds/io"
-fungible-token-io.path = "fungible-token/io"
-galactic-express-io.path = "galactic-express/io"
-game-of-chance-io.path = "game-of-chance/io"
-horse-races-io.path = "horse-races/io"
-identity-io.path = "identity/io"
multi-token-io.path = "multi-token/io"
-multisig-wallet-io.path = "multisig-wallet/io"
-nft-io.path = "nft/io"
-nft-marketplace-io.path = "nft-marketplace/io"
-nft-master-io.path = "nft-master/io"
-nft-pixelboard-io.path = "nft-pixelboard/io"
-non-fungible-token-io.path = "non-fungible-token/io"
-on-chain-nft-io.path = "on-chain-nft/io"
-oracle-io.path = "oracle/io"
-oracle-randomness-io.path = "oracle/randomness/io"
-ping-io.path = "ping/io"
-rentable-nft-io.path = "rentable-nft/io"
rmrk-catalog-io.path = "rmrk/catalog/io"
rmrk-io.path = "rmrk/io"
rmrk-resource-io.path = "rmrk/resource/io"
rock-paper-scissors-io.path = "rock-paper-scissors/io"
-roll-the-dice-io.path = "roll-the-dice/io"
-sharded-fungible-token-io.path = "sharded-fungible-token/io"
-sharded-fungible-token-logic-io.path = "sharded-fungible-token/logic/io"
-sharded-fungible-token-storage-io.path = "sharded-fungible-token/storage/io"
-sharded-multi-token-io.path = "sharded-multi-token/io"
-sharded-multi-token-logic-io.path = "sharded-multi-token/logic/io"
-sharded-multi-token-storage-io.path = "sharded-multi-token/storage/io"
-staking-io.path = "staking/io"
-student-nft-io.path = "student-nft/io"
-supply-chain-io.path = "supply-chain/io"
+oracle-io.path = "oracle/io"
+oracle-randomness-io.path = "oracle/randomness/io"
syndote-io.path = "syndote/io"
syndote-player-io.path = "syndote/player/io"
tamagotchi-io.path = "tamagotchi/io"
tamagotchi-battle-io.path = "tamagotchi-battle/io"
tequila-train-io.path = "tequila-train/io"
-tic-tac-toe-io.path = "tic-tac-toe/io"
-vara-man-io.path = "vara-man/io"
-varatube-io.path = "varatube/io"
w3bstreaming-io.path = "w3bstreaming/io"
# Local libraries
# Keep in the lexicographic order!
-
-gear-lib.path = "gear-lib"
-gear-lib-old.path = "gear-lib-old"
-gear-lib-derive.path = "gear-lib-old/derive"
rmrk-types.path = "rmrk/types"
-supply-chain-deploy.path = "supply-chain/deploy"
# Gear
-gstd = "1.5.0"
-gear-wasm-builder = "1.5.0"
-gmeta = "1.5.0"
-gclient = "1.5.0"
-gtest = "1.4.2"
-gear-core = "1.5.0"
+gstd = "1.7.0"
+gear-wasm-builder = "1.7.0"
+gmeta = "1.7.0"
+gclient = "1.7.0"
+gtest = "1.6.1"
+gear-core = "1.7.0"
+sails-idl-gen = "0.7.0"
+sails-rs = "0.7.0"
+sails-client-gen = "0.7.0"
+session-service = { git = "https://github.com/gear-foundation/signless-gasless-session-service.git" }
+extended-vft-client = { git = "https://github.com/gear-foundation/standards/"}
+extended-vnft-client = { git = "https://github.com/gear-foundation/standards/"}
+extended-vmt-client = { git = "https://github.com/gear-foundation/standards/"}
+extended-vmt = { git = "https://github.com/gear-foundation/standards/"}
+extended-vft = { git = "https://github.com/gear-foundation/standards/"}
+extended-vnft = { git = "https://github.com/gear-foundation/standards/"}
# External
diff --git a/contracts/README.md b/contracts/README.md
index eda6f15be..3b68cd9cf 100644
--- a/contracts/README.md
+++ b/contracts/README.md
@@ -29,26 +29,20 @@ Note that it's built from the latest commit on the `master` branch. Therefore, w
### 🏗️ Build all contract & states
```sh
-cargo b
+cargo b -r
```
### ✅ Build & run tests
Run all tests, except `gclient` ones:
```sh
-cargo t -- --skip gclient
+cargo t -r -- --skip gclient
```
Run all tests:
```sh
# Download the node binary.
-cargo xtask node
-cargo t
-```
-
-### 🚀 Run CI locally (should be done before a commit)
-```sh
-cargo xtask ci
+cargo t -r
```
## Versioning & backwards compatibility
diff --git a/contracts/auto-changed-nft/Cargo.toml b/contracts/auto-changed-nft/Cargo.toml
deleted file mode 100644
index 1be9ba11d..000000000
--- a/contracts/auto-changed-nft/Cargo.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[package]
-name = "auto-changed-nft"
-version.workspace = true
-edition.workspace = true
-publish.workspace = true
-
-[dependencies]
-gstd.workspace = true
-primitive-types.workspace = true
-auto-changed-nft-io.workspace = true
-gear-lib-old.workspace = true
-gear-lib-derive.workspace = true
-sp-core-hashing.workspace = true
-gmeta.workspace = true
-
-[dev-dependencies]
-hex-literal.workspace = true
-sp-core.workspace = true
-gtest.workspace = true
-gclient.workspace = true
-tokio.workspace = true
-
-[build-dependencies]
-gear-wasm-builder.workspace = true
-auto-changed-nft-io.workspace = true
diff --git a/contracts/auto-changed-nft/README.md b/contracts/auto-changed-nft/README.md
deleted file mode 100644
index 4bc41fa48..000000000
--- a/contracts/auto-changed-nft/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-[![Open in Gitpod](https://img.shields.io/badge/Open_in-Gitpod-white?logo=gitpod)](https://gitpod.io/#FOLDER=auto-changed-nft/https://github.com/gear-foundation/dapps)
-[![Docs](https://img.shields.io/github/actions/workflow/status/gear-foundation/dapps/contracts.yml?logo=rust&label=docs)](https://dapps.gear.rs/auto_changed_nft_io)
-
-# [Auto-changed NFT](https://wiki.gear-tech.io/docs/examples/NFTs/dynamic-nft#examples)
-
-An example of Auto-Changed NFT (modified [Dynamic NFT](../dynamic-nft)).
-
-### 🏗️ Building
-
-```sh
-cargo b -p "auto-changed-nft*"
-```
-
-### ✅ Testing
-
-Run all tests, except `gclient` ones:
-```sh
-cargo t -p "auto-changed-nft*" -- --skip gclient
-```
-
-Run all tests:
-```sh
-# Download the node binary.
-cargo xtask node
-cargo t -p "auto-changed-nft*"
-```
diff --git a/contracts/auto-changed-nft/build.rs b/contracts/auto-changed-nft/build.rs
deleted file mode 100644
index ddcd2194d..000000000
--- a/contracts/auto-changed-nft/build.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-use auto_changed_nft_io::NFTMetadata;
-
-fn main() {
- gear_wasm_builder::build_with_metadata::();
-}
diff --git a/contracts/auto-changed-nft/io/Cargo.toml b/contracts/auto-changed-nft/io/Cargo.toml
deleted file mode 100644
index 001e2be7e..000000000
--- a/contracts/auto-changed-nft/io/Cargo.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[package]
-name = "auto-changed-nft-io"
-version.workspace = true
-edition.workspace = true
-publish.workspace = true
-
-[dependencies]
-gstd.workspace = true
-gear-lib-old.workspace = true
-primitive-types.workspace = true
-gmeta.workspace = true
diff --git a/contracts/auto-changed-nft/io/src/lib.rs b/contracts/auto-changed-nft/io/src/lib.rs
deleted file mode 100644
index 7aaf8e9c1..000000000
--- a/contracts/auto-changed-nft/io/src/lib.rs
+++ /dev/null
@@ -1,236 +0,0 @@
-#![no_std]
-
-use gear_lib_old::non_fungible_token::{
- io::{NFTApproval, NFTTransfer, NFTTransferPayout},
- royalties::*,
- state::NFTState,
- token::*,
-};
-use gmeta::{In, InOut, Metadata, Out};
-use gstd::{prelude::*, ActorId};
-
-pub use gear_lib_old::non_fungible_token::delegated::DelegatedApproveMessage;
-use primitive_types::H256;
-
-pub struct NFTMetadata;
-
-#[derive(Default, Debug, Encode, Decode, PartialEq, Eq, PartialOrd, Ord, Clone, TypeInfo, Hash)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub struct Config {
- pub max_mint_count: Option,
- pub authorized_minters: Vec,
-}
-
-#[derive(Default, Debug, Encode, Decode, PartialEq, Eq, PartialOrd, Ord, Clone, TypeInfo, Hash)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub struct InitNFT {
- pub collection: Collection,
- pub royalties: Option,
- pub config: Config,
-}
-
-#[derive(Default, Debug, Encode, Decode, PartialEq, Eq, PartialOrd, Ord, Clone, TypeInfo, Hash)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub struct Collection {
- pub name: String,
- pub description: String,
-}
-
-impl Metadata for NFTMetadata {
- type Init = In;
- type Handle = InOut;
- type Reply = ();
- type Others = ();
- type Signal = ();
- type State = Out;
-}
-
-#[derive(Debug, Encode, Decode, TypeInfo)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub enum NFTAction {
- Mint {
- transaction_id: u64,
- token_metadata: TokenMetadata,
- },
- Burn {
- transaction_id: u64,
- token_id: TokenId,
- },
- Transfer {
- transaction_id: u64,
- to: ActorId,
- token_id: TokenId,
- },
- TransferPayout {
- transaction_id: u64,
- to: ActorId,
- token_id: TokenId,
- amount: u128,
- },
- NFTPayout {
- owner: ActorId,
- amount: u128,
- },
- Approve {
- transaction_id: u64,
- to: ActorId,
- token_id: TokenId,
- },
- DelegatedApprove {
- transaction_id: u64,
- message: DelegatedApproveMessage,
- signature: [u8; 64],
- },
- Owner {
- token_id: TokenId,
- },
- IsApproved {
- to: ActorId,
- token_id: TokenId,
- },
- Clear {
- transaction_hash: H256,
- },
- AddMinter {
- transaction_id: u64,
- minter_id: ActorId,
- },
- AddMedia {
- token_id: TokenId,
- media: String,
- },
- StartAutoChanging {
- token_ids: Vec,
- updates_count: u32,
- update_period: u32,
- },
- Update {
- token_ids: Vec,
- rest_updates_count: u32,
- },
- ReserveGas,
-}
-
-#[derive(Encode, Decode, TypeInfo, Debug, Clone)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub enum NFTEvent {
- Transfer(NFTTransfer),
- TransferPayout(NFTTransferPayout),
- NFTPayout(Payout),
- Approval(NFTApproval),
- Owner {
- owner: ActorId,
- token_id: TokenId,
- },
- IsApproved {
- to: ActorId,
- token_id: TokenId,
- approved: bool,
- },
- MinterAdded {
- minter_id: ActorId,
- },
- Updated {
- data_hash: H256,
- },
- CurrentUrl(String),
- GasReserved,
-}
-
-#[derive(Debug, Clone, Default, Encode, Decode, TypeInfo)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub struct IoNFTState {
- pub name: String,
- pub symbol: String,
- pub base_uri: String,
- pub owner_by_id: Vec<(TokenId, ActorId)>,
- pub token_approvals: Vec<(TokenId, Vec)>,
- pub token_metadata_by_id: Vec<(TokenId, Option)>,
- pub tokens_for_owner: Vec<(ActorId, Vec)>,
- pub royalties: Option,
-}
-
-#[derive(Debug, Clone, Default, Encode, Decode, TypeInfo)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub struct IoNFT {
- pub token: IoNFTState,
- pub token_id: TokenId,
- pub owner: ActorId,
- pub transactions: Vec<(H256, NFTEvent)>,
- pub urls: Vec<(TokenId, Vec)>,
- pub update_number: u32,
-}
-
-impl From<&NFTState> for IoNFTState {
- fn from(value: &NFTState) -> Self {
- let NFTState {
- name,
- symbol,
- base_uri,
- owner_by_id,
- token_approvals,
- token_metadata_by_id,
- tokens_for_owner,
- royalties,
- } = value;
-
- let owner_by_id = owner_by_id
- .iter()
- .map(|(hash, actor_id)| (*hash, *actor_id))
- .collect();
-
- let token_approvals = token_approvals
- .iter()
- .map(|(key, approvals)| (*key, approvals.iter().copied().collect()))
- .collect();
-
- let token_metadata_by_id = token_metadata_by_id
- .iter()
- .map(|(id, metadata)| (*id, metadata.clone()))
- .collect();
-
- let tokens_for_owner = tokens_for_owner
- .iter()
- .map(|(id, tokens)| (*id, tokens.clone()))
- .collect();
-
- Self {
- name: name.clone(),
- symbol: symbol.clone(),
- base_uri: base_uri.clone(),
- owner_by_id,
- token_approvals,
- token_metadata_by_id,
- tokens_for_owner,
- royalties: royalties.clone(),
- }
- }
-}
-
-#[derive(Debug, Clone, Encode, Decode, TypeInfo)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub struct Nft {
- pub owner: ActorId,
- pub name: String,
- pub description: String,
- pub media_url: String,
- pub attrib_url: String,
-}
-
-#[derive(Debug, Encode, Decode, TypeInfo)]
-#[codec(crate = gstd::codec)]
-#[scale_info(crate = gstd::scale_info)]
-pub struct State {
- pub tokens: Vec<(TokenId, Nft)>,
- pub owners: Vec<(ActorId, TokenId)>,
- pub collection: Collection,
- pub nonce: TokenId,
-}
diff --git a/contracts/auto-changed-nft/src/lib.rs b/contracts/auto-changed-nft/src/lib.rs
deleted file mode 100644
index 652da3754..000000000
--- a/contracts/auto-changed-nft/src/lib.rs
+++ /dev/null
@@ -1,408 +0,0 @@
-#![no_std]
-
-use auto_changed_nft_io::*;
-use gear_lib_derive::{NFTCore, NFTMetaState, NFTStateKeeper};
-use gear_lib_old::non_fungible_token::{io::NFTTransfer, nft_core::*, state::*, token::*};
-use gstd::{
- collections::HashMap,
- exec::{self},
- msg::{self, send_delayed, send_delayed_from_reservation},
- prelude::*,
- ActorId, ReservationId,
-};
-use primitive_types::{H256, U256};
-
-include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
-
-const RESERVATION_AMOUNT: u64 = 240_000_000_000;
-const GAS_FOR_UPDATE: u64 = 4_000_000_000;
-
-#[derive(Debug, Default, NFTStateKeeper, NFTCore, NFTMetaState)]
-pub struct AutoChangedNft {
- #[NFTStateField]
- pub token: NFTState,
- pub token_id: TokenId,
- pub owner: ActorId,
- pub transactions: HashMap,
- pub collection: Collection,
- pub config: Config,
- pub urls: HashMap>,
- pub rest_updates_count: u32,
- pub update_period: u32,
-}
-
-static mut CONTRACT: Option = None;
-static mut RESERVATION: Vec = vec![];
-
-#[no_mangle]
-unsafe extern fn init() {
- let config: InitNFT = msg::load().expect("Unable to decode InitNFT");
- if config.royalties.is_some() {
- config.royalties.as_ref().expect("Unable to g").validate();
- }
- let nft = AutoChangedNft {
- token: NFTState {
- name: config.collection.name.clone(),
- royalties: config.royalties,
- ..Default::default()
- },
- collection: config.collection,
- config: config.config,
- owner: msg::source(),
- ..Default::default()
- };
-
- CONTRACT = Some(nft);
-}
-
-#[no_mangle]
-extern fn handle() {
- let action: NFTAction = msg::load().expect("Could not load NFTAction");
- let nft = unsafe { CONTRACT.get_or_insert(Default::default()) };
- match action {
- NFTAction::Mint {
- transaction_id,
- token_metadata,
- } => {
- nft.check_config();
- msg::reply(
- nft.process_transaction(transaction_id, |nft| {
- NFTEvent::Transfer(MyNFTCore::mint(nft, token_metadata))
- }),
- 0,
- )
- .expect("Error during replying with `NFTEvent::Transfer`");
- }
- NFTAction::Burn {
- transaction_id,
- token_id,
- } => {
- msg::reply(
- nft.process_transaction(transaction_id, |nft| {
- NFTEvent::Transfer(NFTCore::burn(nft, token_id))
- }),
- 0,
- )
- .expect("Error during replying with `NFTEvent::Transfer`");
- }
- NFTAction::Transfer {
- transaction_id,
- to,
- token_id,
- } => {
- msg::reply(
- nft.process_transaction(transaction_id, |nft| {
- NFTEvent::Transfer(NFTCore::transfer(nft, &to, token_id))
- }),
- 0,
- )
- .expect("Error during replying with `NFTEvent::Transfer`");
- }
- NFTAction::TransferPayout {
- transaction_id,
- to,
- token_id,
- amount,
- } => {
- msg::reply(
- nft.process_transaction(transaction_id, |nft| {
- NFTEvent::TransferPayout(NFTCore::transfer_payout(nft, &to, token_id, amount))
- }),
- 0,
- )
- .expect("Error during replying with `NFTEvent::TransferPayout`");
- }
- NFTAction::NFTPayout { owner, amount } => {
- msg::reply(
- NFTEvent::NFTPayout(NFTCore::nft_payout(nft, &owner, amount)),
- 0,
- )
- .expect("Error during replying with `NFTEvent::NFTPayout`");
- }
- NFTAction::Approve {
- transaction_id,
- to,
- token_id,
- } => {
- msg::reply(
- nft.process_transaction(transaction_id, |nft| {
- NFTEvent::Approval(NFTCore::approve(nft, &to, token_id))
- }),
- 0,
- )
- .expect("Error during replying with `NFTEvent::Approval`");
- }
- NFTAction::Owner { token_id } => {
- msg::reply(
- NFTEvent::Owner {
- owner: NFTCore::owner_of(nft, token_id),
- token_id,
- },
- 0,
- )
- .expect("Error during replying with `NFTEvent::Owner`");
- }
- NFTAction::IsApproved { to, token_id } => {
- msg::reply(
- NFTEvent::IsApproved {
- to,
- token_id,
- approved: NFTCore::is_approved_to(nft, &to, token_id),
- },
- 0,
- )
- .expect("Error during replying with `NFTEvent::IsApproved`");
- }
- NFTAction::DelegatedApprove {
- transaction_id,
- message,
- signature,
- } => {
- msg::reply(
- nft.process_transaction(transaction_id, |nft| {
- NFTEvent::Approval(NFTCore::delegated_approve(nft, message, signature))
- }),
- 0,
- )
- .expect("Error during replying with `NFTEvent::Approval`");
- }
- NFTAction::Clear { transaction_hash } => nft.clear(transaction_hash),
- NFTAction::AddMinter {
- transaction_id,
- minter_id,
- } => {
- nft.check_config();
- msg::reply(
- nft.process_transaction(transaction_id, |nft| {
- nft.config.authorized_minters.push(minter_id);
- NFTEvent::MinterAdded { minter_id }
- }),
- 0,
- )
- .expect("Error during replying with `NFTEvent::Approval`");
- }
- NFTAction::ReserveGas => nft.reserve_gas(),
- NFTAction::AddMedia { token_id, media } => {
- if let Some(urls) = nft.urls.get_mut(&token_id) {
- urls.push(media);
- } else {
- nft.urls.insert(token_id, vec![media]);
- }
- }
- NFTAction::Update {
- rest_updates_count,
- token_ids,
- } => {
- nft.rest_updates_count = rest_updates_count - 1;
- nft.update_media(&token_ids);
- if nft.rest_updates_count == 0 {
- return;
- }
- let action = NFTAction::Update {
- rest_updates_count: nft.rest_updates_count,
- token_ids,
- };
- let gas_available = exec::gas_available();
- if gas_available <= GAS_FOR_UPDATE {
- let reservations: &mut Vec = unsafe { RESERVATION.as_mut() };
- let reservation_id = reservations.pop().expect("Need more gas");
- send_delayed_from_reservation(
- reservation_id,
- exec::program_id(),
- action,
- 0,
- nft.update_period,
- )
- .expect("Can't send delayed from reservation");
- } else {
- send_delayed(exec::program_id(), action, 0, nft.update_period)
- .expect("Can't send delayed");
- }
- }
- NFTAction::StartAutoChanging {
- updates_count,
- update_period,
- token_ids,
- } => {
- nft.rest_updates_count = updates_count;
- nft.update_period = update_period;
-
- nft.update_media(&token_ids);
-
- let payload = NFTAction::Update {
- rest_updates_count: updates_count,
- token_ids: token_ids.clone(),
- };
- send_delayed(exec::program_id(), payload, 0, update_period)
- .expect("Can't send delayed");
- nft.reserve_gas();
- }
- };
-}
-
-pub trait MyNFTCore: NFTCore {
- fn mint(&mut self, token_metadata: TokenMetadata) -> NFTTransfer;
-}
-
-impl MyNFTCore for AutoChangedNft {
- fn mint(&mut self, token_metadata: TokenMetadata) -> NFTTransfer {
- let transfer = NFTCore::mint(self, &msg::source(), self.token_id, Some(token_metadata));
- self.token_id = self.token_id.saturating_add(U256::one());
- transfer
- }
-}
-
-impl AutoChangedNft {
- fn process_transaction(
- &mut self,
- transaction_id: u64,
- action: impl FnOnce(&mut AutoChangedNft) -> NFTEvent,
- ) -> NFTEvent {
- let transaction_hash = get_hash(&msg::source(), transaction_id);
-
- if let Some(nft_event) = self.transactions.get(&transaction_hash) {
- nft_event.clone()
- } else {
- let nft_event = action(self);
-
- self.transactions
- .insert(transaction_hash, nft_event.clone());
-
- nft_event
- }
- }
-
- fn clear(&mut self, transaction_hash: H256) {
- assert_eq!(
- msg::source(),
- exec::program_id(),
- "Not allowed to clear transactions"
- );
- self.transactions.remove(&transaction_hash);
- }
- fn check_config(&self) {
- if let Some(max_mint_count) = self.config.max_mint_count {
- if max_mint_count <= self.token.token_metadata_by_id.len() as u32 {
- panic!(
- "Mint impossible because max minting count {} limit exceeded",
- max_mint_count
- );
- }
- }
-
- let current_minter = msg::source();
- let is_authorized_minter = self
- .config
- .authorized_minters
- .iter()
- .any(|authorized_minter| authorized_minter.eq(¤t_minter));
-
- if !is_authorized_minter {
- panic!(
- "Current minter {:?} is not authorized at initialization",
- current_minter
- );
- }
- }
-
- fn update_media(&mut self, token_ids: &Vec) {
- for token_id in token_ids {
- if let Some(Some(meta)) = self.token.token_metadata_by_id.get_mut(token_id) {
- let urls_for_token = &self.urls[token_id];
- let index = self.rest_updates_count as usize % urls_for_token.len();
- let media = urls_for_token[index].clone();
- meta.media = media
- }
- }
- }
- fn reserve_gas(&self) {
- let reservations: &mut Vec = unsafe { RESERVATION.as_mut() };
- let reservation_id =
- ReservationId::reserve(RESERVATION_AMOUNT, 600).expect("reservation across executions");
- reservations.push(reservation_id);
- }
-}
-
-#[no_mangle]
-extern fn state() {
- let contract = unsafe { CONTRACT.take().expect("Unexpected error in taking state") };
- msg::reply::(contract.into(), 0)
- .expect("Failed to encode or reply with `IoNFT` from `state()`");
-}
-
-pub fn get_hash(account: &ActorId, transaction_id: u64) -> H256 {
- let account: [u8; 32] = (*account).into();
- let transaction_id = transaction_id.to_be_bytes();
- sp_core_hashing::blake2_256(&[account.as_slice(), transaction_id.as_slice()].concat()).into()
-}
-
-impl From for IoNFT {
- fn from(value: AutoChangedNft) -> Self {
- let AutoChangedNft {
- token,
- token_id,
- owner,
- transactions,
- urls,
- rest_updates_count: update_number,
- ..
- } = value;
-
- let transactions = transactions
- .iter()
- .map(|(key, event)| (*key, event.clone()))
- .collect();
- let urls = urls
- .iter()
- .map(|(token_id, urls)| (*token_id, urls.clone()))
- .collect();
- Self {
- token: (&token).into(),
- token_id,
- owner,
- transactions,
- urls,
- update_number,
- }
- }
-}
-
-impl From for State {
- fn from(value: AutoChangedNft) -> Self {
- let AutoChangedNft {
- token,
- token_id,
- collection,
- ..
- } = value;
-
- let owners = token
- .owner_by_id
- .iter()
- .map(|(hash, actor_id)| (*actor_id, *hash))
- .collect();
-
- let token_metadata_by_id = token
- .token_metadata_by_id
- .iter()
- .map(|(id, metadata)| {
- let metadata = metadata.as_ref().unwrap();
- let nft = Nft {
- owner: *token.owner_by_id.get(id).unwrap(),
- name: metadata.name.clone(),
- description: metadata.description.clone(),
- media_url: metadata.media.clone(),
- attrib_url: metadata.reference.clone(),
- };
- (*id, nft)
- })
- .collect();
-
- Self {
- tokens: token_metadata_by_id,
- collection,
- nonce: token_id,
- owners,
- }
- }
-}
diff --git a/contracts/auto-changed-nft/state/Cargo.toml b/contracts/auto-changed-nft/state/Cargo.toml
deleted file mode 100644
index 85f96069e..000000000
--- a/contracts/auto-changed-nft/state/Cargo.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-[package]
-name = "auto-changed-nft-state"
-version.workspace = true
-edition.workspace = true
-publish.workspace = true
-
-[dependencies]
-gstd.workspace = true
-gmeta = { workspace = true, features = ["codegen"] }
-auto-changed-nft-io.workspace = true
-gear-lib-old.workspace = true
-
-[build-dependencies]
-gear-wasm-builder = { workspace = true, features = ["metawasm"] }
diff --git a/contracts/auto-changed-nft/state/build.rs b/contracts/auto-changed-nft/state/build.rs
deleted file mode 100644
index 7485036bc..000000000
--- a/contracts/auto-changed-nft/state/build.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- gear_wasm_builder::build_metawasm()
-}
diff --git a/contracts/auto-changed-nft/state/src/lib.rs b/contracts/auto-changed-nft/state/src/lib.rs
deleted file mode 100644
index f1d86e95c..000000000
--- a/contracts/auto-changed-nft/state/src/lib.rs
+++ /dev/null
@@ -1,128 +0,0 @@
-#![no_std]
-
-use auto_changed_nft_io::*;
-use gear_lib_old::non_fungible_token::{
- state::NFTQueryReply,
- token::{Token, TokenId},
-};
-use gstd::{ActorId, Vec};
-
-#[gmeta::metawasm]
-pub mod metafns {
- pub type State = IoNFT;
-
- pub fn info(state: State) -> NFTQueryReply {
- NFTQueryReply::NFTInfo {
- name: state.token.name.clone(),
- symbol: state.token.symbol.clone(),
- base_uri: state.token.base_uri,
- }
- }
-
- pub fn token(state: State, token_id: TokenId) -> Token {
- token_helper(&token_id, &state)
- }
-
- pub fn tokens_for_owner(state: State, owner: ActorId) -> Vec {
- let mut tokens: Vec = Vec::new();
- if let Some((_owner, token_ids)) = state
- .token
- .tokens_for_owner
- .iter()
- .find(|(id, _tokens)| owner.eq(id))
- {
- for token_id in token_ids {
- tokens.push(token_helper(token_id, &state));
- }
- }
- tokens
- }
- pub fn total_supply(state: State) -> u128 {
- state.token.owner_by_id.len() as u128
- }
-
- pub fn supply_for_owner(state: State, owner: ActorId) -> u128 {
- let tokens = state
- .token
- .tokens_for_owner
- .iter()
- .find(|(id, _tokens)| owner.eq(id));
-
- tokens
- .map(|(_id, tokens)| tokens.len() as u128)
- .unwrap_or(0)
- }
-
- pub fn all_tokens(state: State) -> Vec {
- state
- .token
- .owner_by_id
- .iter()
- .map(|(id, _owner)| token_helper(id, &state))
- .collect()
- }
-
- pub fn token_by_id(state: State, id: TokenId) -> Option {
- state
- .token
- .owner_by_id
- .iter()
- .find(|(i, _)| id.eq(i))
- .map(|(token_id, _)| token_helper(token_id, &state))
- }
-
- pub fn approved_tokens(state: State, account: ActorId) -> Vec {
- state
- .token
- .owner_by_id
- .iter()
- .filter_map(|(id, _owner)| {
- state
- .token
- .token_approvals
- .iter()
- .find(|(token_id, _approvals)| token_id.eq(id))
- .and_then(|(_token_id, approvals)| {
- if approvals.contains(&account) {
- Some(token_helper(id, &state))
- } else {
- None
- }
- })
- })
- .collect()
- }
-}
-
-fn token_helper(token_id: &TokenId, state: &IoNFT) -> Token {
- let mut token = Token::default();
- if let Some((_token_id, owner_id)) = state
- .token
- .owner_by_id
- .iter()
- .find(|(id, _metadata)| token_id.eq(id))
- {
- token.id = *token_id;
- token.owner_id = *owner_id;
- }
- if let Some((_token_id, approved_account_ids)) = state
- .token
- .token_approvals
- .iter()
- .find(|(id, _metadata)| token_id.eq(id))
- {
- token.approved_account_ids = approved_account_ids.iter().copied().collect();
- }
- if let Some((_token_id, Some(metadata))) = state
- .token
- .token_metadata_by_id
- .iter()
- .find(|(id, _metadata)| token_id.eq(id))
- {
- token.name.clone_from(&metadata.name);
- token.description.clone_from(&metadata.description);
- token.media.clone_from(&metadata.media);
- token.reference.clone_from(&metadata.reference);
- }
- token
-}
diff --git a/contracts/auto-changed-nft/tests/nft_tests.rs b/contracts/auto-changed-nft/tests/nft_tests.rs
deleted file mode 100644
index 6805d9673..000000000
--- a/contracts/auto-changed-nft/tests/nft_tests.rs
+++ /dev/null
@@ -1,543 +0,0 @@
-use gear_lib_old::non_fungible_token::{io::*, token::TokenId};
-use gstd::{ActorId, Encode};
-use gtest::System;
-mod utils;
-use auto_changed_nft_io::*;
-use hex_literal::hex;
-use sp_core::{sr25519::Pair as Sr25519Pair, Pair};
-use utils::*;
-
-const USERS: &[u64] = &[3, 4, 5];
-const ZERO_ID: u64 = 0;
-
-#[test]
-fn mint_success() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let transaction_id: u64 = 0;
- let res = mint(&nft, transaction_id, USERS[0]);
- let message = NFTEvent::Transfer(NFTTransfer {
- from: ZERO_ID.into(),
- to: USERS[0].into(),
- token_id: 0.into(),
- })
- .encode();
- assert!(res.contains(&(USERS[0], message)));
-}
-
-#[test]
-fn mint_limit_exceed() {
- let sys = System::new();
- sys.init_logger();
- let nft = gtest::Program::current_opt(&sys);
-
- let collection = Collection {
- name: String::from("MyToken"),
- description: String::from("My token"),
- };
-
- let init_nft = InitNFT {
- collection,
- royalties: None,
- config: Config {
- max_mint_count: Some(1),
- authorized_minters: vec![USERS[0].into()],
- },
- };
-
- let res = nft.send(USERS[0], init_nft);
-
- assert!(!res.main_failed());
-
- let nft = sys.get_program(1).unwrap();
- let transaction_id: u64 = 0;
- let res = mint(&nft, transaction_id, USERS[0]);
- assert!(!res.main_failed());
- let res = mint(&nft, transaction_id + 1, USERS[1]);
- assert!(res.main_failed())
-}
-
-#[test]
-fn mint_authorized() {
- let sys = System::new();
- sys.init_logger();
- let nft = gtest::Program::current_opt(&sys);
-
- let collection = Collection {
- name: String::from("MyToken"),
- description: String::from("My token"),
- };
-
- let authorized_minters: Vec = vec![USERS[0].into()];
- let init_nft = InitNFT {
- collection,
- royalties: None,
- config: Config {
- max_mint_count: None,
- authorized_minters,
- },
- };
-
- let res = nft.send(USERS[0], init_nft);
-
- assert!(!res.main_failed());
-
- let nft = sys.get_program(1).unwrap();
- let transaction_id: u64 = 0;
- let res = mint(&nft, transaction_id, USERS[0]);
- assert!(!res.main_failed());
- let res = mint(&nft, transaction_id + 1, USERS[0]);
- assert!(!res.main_failed())
-}
-
-#[test]
-fn mint_not_authorized() {
- let sys = System::new();
- sys.init_logger();
- let nft = gtest::Program::current_opt(&sys);
-
- let collection = Collection {
- name: String::from("MyToken"),
- description: String::from("My token"),
- };
-
- let authorized_minters: Vec = vec![USERS[0].into()];
- let init_nft = InitNFT {
- collection,
- royalties: None,
- config: Config {
- max_mint_count: None,
- authorized_minters,
- },
- };
-
- let res = nft.send(USERS[0], init_nft);
-
- assert!(!res.main_failed());
-
- let nft = sys.get_program(1).unwrap();
- let transaction_id: u64 = 0;
- let res = mint(&nft, transaction_id, USERS[0]);
- assert!(!res.main_failed());
- let res = mint(&nft, transaction_id + 1, USERS[1]);
- assert!(res.main_failed())
-}
-
-#[test]
-fn mint_added() {
- let sys = System::new();
- sys.init_logger();
- let nft = gtest::Program::current_opt(&sys);
-
- let collection = Collection {
- name: String::from("MyToken"),
- description: String::from("My token"),
- };
-
- let authorized_minters: Vec = vec![USERS[0].into()];
- let init_nft = InitNFT {
- collection,
- royalties: None,
- config: Config {
- max_mint_count: None,
- authorized_minters,
- },
- };
-
- let res = nft.send(USERS[0], init_nft);
-
- assert!(!res.main_failed());
-
- let nft = sys.get_program(1).unwrap();
- let transaction_id: u64 = 0;
- let res = add_minter(&nft, transaction_id, USERS[1].into(), USERS[0]);
- assert!(!res.main_failed());
- let res = add_minter(&nft, transaction_id + 1, USERS[2].into(), USERS[1]);
- assert!(!res.main_failed());
-
- let res = add_minter(&nft, transaction_id + 1, 5.into(), 7);
- assert!(res.main_failed())
-}
-
-#[test]
-fn burn_success() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- transaction_id += 1;
- let res = burn(&nft, transaction_id, USERS[0], 0);
- let message = NFTEvent::Transfer(NFTTransfer {
- from: USERS[0].into(),
- to: ZERO_ID.into(),
- token_id: 0.into(),
- })
- .encode();
- assert!(res.contains(&(USERS[0], message)));
-}
-
-#[test]
-fn burn_failures() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- // must fail since the token doesn't exist
- transaction_id += 1;
- assert!(burn(&nft, transaction_id, USERS[0], 1).main_failed());
- // must fail since the caller is not the token owner
- transaction_id += 1;
- assert!(burn(&nft, transaction_id, USERS[1], 0).main_failed());
-}
-
-#[test]
-fn transfer_success() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- transaction_id += 1;
- let res = transfer(&nft, transaction_id, USERS[0], USERS[1], 0);
- let message = NFTEvent::Transfer(NFTTransfer {
- from: USERS[0].into(),
- to: USERS[1].into(),
- token_id: 0.into(),
- })
- .encode();
- assert!(res.contains(&(USERS[0], message)));
-}
-
-#[test]
-fn transfer_failures() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
-
- // must fail since the token doesn't exist
- transaction_id += 1;
- assert!(transfer(&nft, transaction_id, USERS[0], USERS[1], 1).main_failed());
- // must fail since the caller is not the token owner
- transaction_id += 1;
- assert!(transfer(&nft, transaction_id, USERS[1], USERS[0], 0).main_failed());
- // must fail since transfer to the zero address
- transaction_id += 1;
- assert!(transfer(&nft, transaction_id, USERS[1], ZERO_ID, 0).main_failed());
-}
-
-#[test]
-fn owner_success() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- transaction_id += 1;
- assert!(!approve(&nft, transaction_id, USERS[0], USERS[1], 0).main_failed());
- let res = owner_of(&nft, USERS[1], 0);
- println!("{:?}", res.decoded_log::());
- let message = NFTEvent::Owner {
- token_id: 0.into(),
- owner: ActorId::from(USERS[0]),
- }
- .encode();
- assert!(res.contains(&(USERS[1], message)));
-}
-
-#[test]
-fn is_approved_to_success() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- transaction_id += 1;
- assert!(!approve(&nft, transaction_id, USERS[0], USERS[1], 0).main_failed());
-
- let res = is_approved_to(&nft, USERS[1], 0, USERS[1]);
- println!("{:?}", res.decoded_log::());
- let message = NFTEvent::IsApproved {
- to: USERS[1].into(),
- token_id: 0.into(),
- approved: true,
- }
- .encode();
- assert!(res.contains(&(USERS[1], message)));
-
- let res = is_approved_to(&nft, USERS[1], 0, USERS[0]);
- println!("{:?}", res.decoded_log::());
- let message = NFTEvent::IsApproved {
- to: USERS[0].into(),
- token_id: 0.into(),
- approved: false,
- }
- .encode();
- assert!(res.contains(&(USERS[1], message)));
-}
-
-#[test]
-fn is_approved_to_failure() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- transaction_id += 1;
- assert!(!approve(&nft, transaction_id, USERS[0], USERS[1], 0).main_failed());
- let res = is_approved_to(&nft, USERS[1], 1, USERS[1]);
- println!("{:?}", res.decoded_log::());
- assert!(res.main_failed());
-}
-
-#[test]
-fn approve_success() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- transaction_id += 1;
- let res = approve(&nft, transaction_id, USERS[0], USERS[1], 0);
- let message = NFTEvent::Approval(NFTApproval {
- owner: USERS[0].into(),
- approved_account: USERS[1].into(),
- token_id: 0.into(),
- })
- .encode();
- assert!(res.contains(&(USERS[0], message)));
- transaction_id += 1;
- assert!(!transfer(&nft, transaction_id, USERS[1], USERS[2], 0).main_failed());
-}
-
-// TODO: fix test
-#[test]
-#[ignore]
-fn auto_change_success() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
-
- let link1 = "link 1";
- let link2 = "link 2";
- let link3 = "link 3";
- let link4 = "link 4";
-
- let token_id = TokenId::default();
- assert!(!add_url(&nft, token_id, link1, USERS[0]).main_failed());
- assert!(!add_url(&nft, token_id, link2, USERS[0]).main_failed());
- assert!(!add_url(&nft, token_id, link3, USERS[0]).main_failed());
- assert!(!add_url(&nft, token_id, link4, USERS[0]).main_failed());
-
- let updates_count = 8;
- let updates_period = 5;
- assert!(!start_auto_changing(
- &nft,
- vec![token_id],
- updates_count,
- updates_period,
- USERS[0]
- )
- .main_failed());
-
- // Start update
- assert_eq!(current_media(&nft, token_id), link1);
- sys.spend_blocks(updates_period);
- assert_eq!(current_media(&nft, token_id), link4);
-
- sys.spend_blocks(updates_period);
- assert_eq!(current_media(&nft, token_id), link3);
-
- sys.spend_blocks(updates_period);
- assert_eq!(current_media(&nft, token_id), link2);
-
- // Media rotation happens
- sys.spend_blocks(updates_period);
- assert_eq!(current_media(&nft, token_id), link1);
-
- sys.spend_blocks(updates_period);
- assert_eq!(current_media(&nft, token_id), link4);
-
- sys.spend_blocks(updates_period);
- assert_eq!(current_media(&nft, token_id), link3);
-
- sys.spend_blocks(updates_period);
- assert_eq!(current_media(&nft, token_id), link2);
-}
-
-#[test]
-fn approve_failures() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let mut transaction_id: u64 = 0;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- transaction_id += 1;
- // must fail since the token doesn't exist
- assert!(approve(&nft, transaction_id, USERS[0], USERS[1], 1).main_failed());
- transaction_id += 1;
- // must fail since the caller is not the token owner
- assert!(approve(&nft, transaction_id, USERS[1], USERS[0], 0).main_failed());
- transaction_id += 1;
- // must fail since approval to the zero address
- assert!(approve(&nft, transaction_id, USERS[1], ZERO_ID, 0).main_failed());
-
- //approve
- transaction_id += 1;
- assert!(!approve(&nft, transaction_id, USERS[0], USERS[1], 0).main_failed());
- //transfer
- transaction_id += 1;
- assert!(!transfer(&nft, transaction_id, USERS[1], USERS[2], 0).main_failed());
- //must fail since approval was removed after transferring
- transaction_id += 1;
- assert!(transfer(&nft, transaction_id, USERS[1], USERS[0], 0).main_failed());
-}
-
-#[test]
-fn delegated_approve_success() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let pair = Sr25519Pair::from_seed(&hex!(
- "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60"
- ));
- let owner_id = pair.public().0;
-
- let mut transaction_id: u64 = 0;
- assert!(!add_minter(&nft, transaction_id, owner_id.into(), USERS[0]).main_failed());
- assert!(!mint_to_actor(&nft, transaction_id, owner_id).main_failed());
-
- let message = DelegatedApproveMessage {
- token_owner_id: owner_id.into(),
- approved_actor_id: USERS[1].into(),
- nft_program_id: 1.into(),
- token_id: 0.into(),
- expiration_timestamp: sys.block_timestamp() + 10,
- };
- let signature = pair.sign(message.encode().as_slice());
-
- transaction_id += 1;
- let res = delegated_approve(&nft, transaction_id, USERS[1], message, signature.0);
- let message = NFTEvent::Approval(NFTApproval {
- owner: owner_id.into(),
- approved_account: USERS[1].into(),
- token_id: 0.into(),
- })
- .encode();
- assert!(res.contains(&(USERS[1], message)));
- assert!(!transfer(&nft, transaction_id, USERS[1], USERS[2], 0).main_failed());
-}
-
-#[test]
-fn delegated_approve_failures() {
- let sys = System::new();
- init_nft(&sys);
- let nft = sys.get_program(1).unwrap();
- let pair = Sr25519Pair::from_seed(&hex!(
- "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60"
- ));
- let owner_id = pair.public().0;
-
- let mut transaction_id: u64 = 0;
- assert!(!add_minter(&nft, transaction_id, owner_id.into(), USERS[0]).main_failed());
- transaction_id += 1;
- assert!(!mint_to_actor(&nft, transaction_id, owner_id).main_failed());
- transaction_id += 1;
- assert!(!mint(&nft, transaction_id, USERS[0]).main_failed());
- transaction_id += 1;
- assert!(!mint_to_actor(&nft, transaction_id, owner_id).main_failed());
-
- // Not owner can't approve nft
- let message = DelegatedApproveMessage {
- token_owner_id: owner_id.into(),
- approved_actor_id: USERS[1].into(),
- nft_program_id: 1.into(),
- token_id: 1.into(),
- expiration_timestamp: sys.block_timestamp() + 10,
- };
- let signature = pair.sign(message.encode().as_slice());
- assert!(delegated_approve(&nft, transaction_id, USERS[1], message, signature.0).main_failed());
-
- // Only approved actor in delegated approve can send delegated approve action
- let message = DelegatedApproveMessage {
- token_owner_id: owner_id.into(),
- approved_actor_id: USERS[1].into(),
- nft_program_id: 1.into(),
- token_id: 0.into(),
- expiration_timestamp: sys.block_timestamp() + 10,
- };
- let signature = pair.sign(message.encode().as_slice());
-
- assert!(delegated_approve(&nft, transaction_id, USERS[0], message, signature.0).main_failed());
- // Must fail if user tries to approve token in wrong contract
- init_nft(&sys);
- let second_nft = sys.get_program(2).unwrap();
- transaction_id += 1;
- assert!(!add_minter(&second_nft, transaction_id, owner_id.into(), USERS[0]).main_failed());
- transaction_id += 1;
- assert!(!mint_to_actor(&second_nft, transaction_id, owner_id).main_failed());
-
- let message = DelegatedApproveMessage {
- token_owner_id: owner_id.into(),
- approved_actor_id: USERS[1].into(),
- nft_program_id: 1.into(),
- token_id: 0.into(),
- expiration_timestamp: sys.block_timestamp() + 10,
- };
- let signature = pair.sign(message.encode().as_slice());
-
- assert!(
- delegated_approve(&second_nft, transaction_id, USERS[1], message, signature.0)
- .main_failed()
- );
-
- // Must fail if user tries to approve token to zero_id
- let message = DelegatedApproveMessage {
- token_owner_id: owner_id.into(),
- approved_actor_id: 0.into(),
- nft_program_id: 1.into(),
- token_id: 0.into(),
- expiration_timestamp: sys.block_timestamp() + 10,
- };
- let signature = pair.sign(message.encode().as_slice());
- assert!(delegated_approve(&nft, transaction_id, 0, message, signature.0).main_failed());
-
- // Signature not corresponds to the message content
- let message = DelegatedApproveMessage {
- token_owner_id: owner_id.into(),
- approved_actor_id: USERS[1].into(),
- nft_program_id: 1.into(),
- token_id: 0.into(),
- expiration_timestamp: sys.block_timestamp() + 10,
- };
- let signature = pair.sign(message.encode().as_slice());
- let wrong_message = DelegatedApproveMessage {
- token_owner_id: owner_id.into(),
- approved_actor_id: USERS[1].into(),
- nft_program_id: 1.into(),
- token_id: 2.into(),
- expiration_timestamp: sys.block_timestamp() + 10,
- };
- assert!(
- delegated_approve(&nft, transaction_id, USERS[1], wrong_message, signature.0).main_failed()
- );
-
- // Approve expired
- let message = DelegatedApproveMessage {
- token_owner_id: owner_id.into(),
- approved_actor_id: USERS[1].into(),
- nft_program_id: 1.into(),
- token_id: 0.into(),
- expiration_timestamp: sys.block_timestamp() + 10,
- };
- let signature = pair.sign(message.encode().as_slice());
-
- sys.spend_blocks(1);
- assert!(delegated_approve(&nft, transaction_id, USERS[1], message, signature.0).main_failed());
-}
diff --git a/contracts/auto-changed-nft/tests/node_tests.rs b/contracts/auto-changed-nft/tests/node_tests.rs
deleted file mode 100644
index 5c896d10e..000000000
--- a/contracts/auto-changed-nft/tests/node_tests.rs
+++ /dev/null
@@ -1,561 +0,0 @@
-use auto_changed_nft::WASM_BINARY_OPT;
-use auto_changed_nft_io::*;
-use gclient::{EventProcessor, GearApi, Result};
-use gear_lib_old::non_fungible_token::token::TokenId;
-use gstd::{ActorId, Encode};
-
-// #[tokio::test]
-// #[ignore]
-// async fn mint_test() -> Result<()> {
-// let api = GearApi::dev_from_path(env!("GEAR_NODE_PATH")).await?;
-
-// let mut listener = api.subscribe().await?; // Subscribing for events.
-
-// // Checking that blocks still running.
-// assert!(listener.blocks_running().await?);
-
-// let init_nft = InitNFT {
-// name: String::from("MyToken"),
-// symbol: String::from("MTK"),
-// base_uri: String::from(""),
-// }
-// .encode();
-// let gas_info = api
-// .calculate_upload_gas(None, WASM_BINARY_OPT.to_vec(), init_nft.clone(), 0, true)
-// .await?;
-
-// let (message_id, program_id, _hash) = api
-// .upload_program_bytes(
-// WASM_BINARY_OPT.to_vec(),
-// gclient::now_micros().to_le_bytes(),
-// init_nft,
-// gas_info.min_limit,
-// 0,
-// )
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// let transaction_id: u64 = 0;
-// use gear_lib::non_fungible_token::token::TokenMetadata;
-// let token_metadata = TokenMetadata {
-// name: "CryptoKitty".to_string(),
-// description: "Description".to_string(),
-// media: "http://".to_string(),
-// reference: "http://".to_string(),
-// };
-
-// let mint_payload = NFTAction::Mint {
-// transaction_id,
-// token_metadata,
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, mint_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, mint_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// Ok(())
-// }
-
-// #[tokio::test]
-// #[ignore]
-// async fn burn_test() -> Result<()> {
-// let api = GearApi::dev_from_path(env!("GEAR_NODE_PATH")).await?;
-
-// let mut listener = api.subscribe().await?; // Subscribing for events.
-
-// // Checking that blocks still running.
-// assert!(listener.blocks_running().await?);
-
-// let init_nft = InitNFT {
-// name: String::from("MyToken"),
-// symbol: String::from("MTK"),
-// base_uri: String::from(""),
-// }
-// .encode();
-// let gas_info = api
-// .calculate_upload_gas(None, WASM_BINARY_OPT.to_vec(), init_nft.clone(), 0, true)
-// .await?;
-
-// let (message_id, program_id, _hash) = api
-// .upload_program_bytes(
-// WASM_BINARY_OPT.to_vec(),
-// gclient::now_micros().to_le_bytes(),
-// init_nft,
-// gas_info.min_limit,
-// 0,
-// )
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// let transaction_id: u64 = 0;
-// use gear_lib::non_fungible_token::token::TokenMetadata;
-// let token_metadata = TokenMetadata {
-// name: "CryptoKitty".to_string(),
-// description: "Description".to_string(),
-// media: "http://".to_string(),
-// reference: "http://".to_string(),
-// };
-
-// let mint_payload = NFTAction::Mint {
-// transaction_id,
-// token_metadata,
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, mint_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, mint_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// let transaction_id = transaction_id + 1;
-
-// let burn_payload = NFTAction::Burn {
-// transaction_id,
-// token_id: 0.into(),
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, burn_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, burn_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// // failures
-// let burn_payload = NFTAction::Burn {
-// transaction_id,
-// token_id: 666.into(),
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, burn_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, burn_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// Ok(())
-// }
-
-// #[tokio::test]
-// #[ignore]
-// async fn transfer_test() -> Result<()> {
-// let api = GearApi::dev_from_path(env!("GEAR_NODE_PATH")).await?;
-
-// let mut listener = api.subscribe().await?; // Subscribing for events.
-
-// // Checking that blocks still running.
-// assert!(listener.blocks_running().await?);
-
-// let init_nft = InitNFT {
-// name: String::from("MyToken"),
-// symbol: String::from("MTK"),
-// base_uri: String::from(""),
-// }
-// .encode();
-// let gas_info = api
-// .calculate_upload_gas(None, WASM_BINARY_OPT.to_vec(), init_nft.clone(), 0, true)
-// .await?;
-
-// let (message_id, program_id, _hash) = api
-// .upload_program_bytes(
-// WASM_BINARY_OPT.to_vec(),
-// gclient::now_micros().to_le_bytes(),
-// init_nft,
-// gas_info.min_limit,
-// 0,
-// )
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// let transaction_id: u64 = 0;
-// use gear_lib::non_fungible_token::token::TokenMetadata;
-// let token_metadata = TokenMetadata {
-// name: "CryptoKitty".to_string(),
-// description: "Description".to_string(),
-// media: "http://".to_string(),
-// reference: "http://".to_string(),
-// };
-
-// let mint_payload = NFTAction::Mint {
-// transaction_id,
-// token_metadata,
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, mint_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, mint_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// let transaction_id = transaction_id + 1;
-
-// let transfer_payload = NFTAction::Transfer {
-// transaction_id,
-// to: ActorId::from(4u64),
-// token_id: 0.into(),
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, transfer_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, transfer_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// Ok(())
-// }
-
-// #[tokio::test]
-// #[ignore]
-// async fn owner_test() -> Result<()> {
-// let api = GearApi::dev_from_path(env!("GEAR_NODE_PATH")).await?;
-
-// let mut listener = api.subscribe().await?; // Subscribing for events.
-
-// // Checking that blocks still running.
-// assert!(listener.blocks_running().await?);
-
-// let init_nft = InitNFT {
-// name: String::from("MyToken"),
-// symbol: String::from("MTK"),
-// base_uri: String::from(""),
-// }
-// .encode();
-// let gas_info = api
-// .calculate_upload_gas(None, WASM_BINARY_OPT.to_vec(), init_nft.clone(), 0, true)
-// .await?;
-
-// let (message_id, program_id, _hash) = api
-// .upload_program_bytes(
-// WASM_BINARY_OPT.to_vec(),
-// gclient::now_micros().to_le_bytes(),
-// init_nft,
-// gas_info.min_limit,
-// 0,
-// )
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// let transaction_id: u64 = 0;
-// use gear_lib::non_fungible_token::token::TokenMetadata;
-// let token_metadata = TokenMetadata {
-// name: "CryptoKitty".to_string(),
-// description: "Description".to_string(),
-// media: "http://".to_string(),
-// reference: "http://".to_string(),
-// };
-
-// let mint_payload = NFTAction::Mint {
-// transaction_id,
-// token_metadata,
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, mint_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, mint_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// let owner_payload = NFTAction::Owner { token_id: 0.into() };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, owner_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, owner_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// Ok(())
-// }
-
-// #[tokio::test]
-// #[ignore]
-// async fn approved() -> Result<()> {
-// let api = GearApi::dev_from_path(env!("GEAR_NODE_PATH")).await?;
-
-// let mut listener = api.subscribe().await?; // Subscribing for events.
-
-// // Checking that blocks still running.
-// assert!(listener.blocks_running().await?);
-
-// let init_nft = InitNFT {
-// name: String::from("MyToken"),
-// symbol: String::from("MTK"),
-// base_uri: String::from(""),
-// }
-// .encode();
-// let gas_info = api
-// .calculate_upload_gas(None, WASM_BINARY_OPT.to_vec(), init_nft.clone(), 0, true)
-// .await?;
-
-// let (message_id, program_id, _hash) = api
-// .upload_program_bytes(
-// WASM_BINARY_OPT.to_vec(),
-// gclient::now_micros().to_le_bytes(),
-// init_nft,
-// gas_info.min_limit,
-// 0,
-// )
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// let transaction_id: u64 = 0;
-// use gear_lib::non_fungible_token::token::TokenMetadata;
-// let token_metadata = TokenMetadata {
-// name: "CryptoKitty".to_string(),
-// description: "Description".to_string(),
-// media: "http://".to_string(),
-// reference: "http://".to_string(),
-// };
-
-// let mint_payload = NFTAction::Mint {
-// transaction_id,
-// token_metadata,
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, mint_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, mint_payload, gas_info.min_limit, 0)
-// .await?;
-
-// assert!(listener.message_processed(message_id).await?.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// let transaction_id = transaction_id + 1;
-// let approve_payload = NFTAction::Approve {
-// transaction_id,
-// to: ActorId::from(3),
-// token_id: 0.into(),
-// };
-
-// let gas_info = api
-// .calculate_handle_gas(None, program_id, approve_payload.encode(), 0, true)
-// .await?;
-
-// let (message_id, _) = api
-// .send_message(program_id, approve_payload, gas_info.min_limit, 0)
-// .await?;
-
-// let processed = listener.message_processed(message_id).await?;
-// assert!(processed.succeed());
-
-// assert!(listener.blocks_running().await?);
-
-// Ok(())
-// }
-
-#[tokio::test]
-async fn gclient_auto_changed() -> Result<()> {
- let api = GearApi::dev_from_path("../target/tmp/gear").await?;
- let mut listener = api.subscribe().await?; // Subscribing for events.
-
- // Checking that blocks still running.
- assert!(listener.blocks_running().await?);
-
- let collection = Collection {
- name: String::from("MyToken"),
- description: String::from("My token"),
- };
- let actor_id = ActorId::new(
- api.account_id()
- .encode()
- .try_into()
- .expect("Unexpected invalid account id length."),
- );
- let init_nft = InitNFT {
- collection,
- royalties: None,
- config: Config {
- max_mint_count: Some(100),
- authorized_minters: vec![actor_id],
- },
- }
- .encode();
- let gas_info = api
- .calculate_upload_gas(None, WASM_BINARY_OPT.to_vec(), init_nft.clone(), 0, true)
- .await?;
- let (message_id, program_id, _hash) = api
- .upload_program_bytes(
- WASM_BINARY_OPT.to_vec(),
- gclient::now_micros().to_le_bytes(),
- init_nft,
- gas_info.burned * 2,
- 0,
- )
- .await?;
-
- assert!(listener.message_processed(message_id).await?.succeed());
-
- let transaction_id: u64 = 0;
- use gear_lib_old::non_fungible_token::token::TokenMetadata;
- let token_metadata = TokenMetadata {
- name: "CryptoKitty".to_string(),
- description: "Description".to_string(),
- media: "http://".to_string(),
- reference: "http://".to_string(),
- };
-
- let mint_payload = NFTAction::Mint {
- transaction_id,
- token_metadata,
- };
-
- let gas_info = api
- .calculate_handle_gas(None, program_id, mint_payload.encode(), 0, true)
- .await?;
- let (message_id, _) = api
- .send_message(program_id, mint_payload, gas_info.burned * 2, 0)
- .await?;
-
- assert!(listener.message_processed(message_id).await?.succeed());
- assert!(listener.blocks_running().await?);
-
- // Add auto-changed media
- let token_id = TokenId::default();
- let links = ["link 1", "link 2", "link 3", "link 4"];
- for link in links.iter() {
- let payload = NFTAction::AddMedia {
- token_id,
- media: link.to_string(),
- };
-
- let gas_info = api
- .calculate_handle_gas(None, program_id, payload.encode(), 0, true)
- .await?;
- let (message_id, _) = api
- .send_message(program_id, payload, gas_info.burned * 2, 0)
- .await?;
- assert!(listener.message_processed(message_id).await?.succeed());
- assert!(listener.blocks_running().await?);
- }
-
- let update_period = 5;
- // Start auto changing
- let payload = NFTAction::StartAutoChanging {
- token_ids: vec![token_id],
- updates_count: 8,
- update_period,
- };
- let (message_id, _) = api
- .send_message(program_id, payload, 250_000_000_000, 0)
- .await?;
- assert!(listener.message_processed(message_id).await?.succeed());
- assert!(listener.blocks_running().await?);
-
- // Start update
- assert_eq!(
- current_media(&api, program_id.into_bytes(), token_id).await,
- links[3]
- );
-
- std::thread::sleep(std::time::Duration::from_secs(15));
- assert_eq!(
- current_media(&api, program_id.into_bytes(), token_id).await,
- links[2]
- );
-
- std::thread::sleep(std::time::Duration::from_secs(15));
- assert_eq!(
- current_media(&api, program_id.into_bytes(), token_id).await,
- links[1]
- );
- std::thread::sleep(std::time::Duration::from_secs(15));
- assert_eq!(
- dbg!(current_media(&api, program_id.into_bytes(), token_id).await),
- dbg!(links[0])
- );
-
- // Media rotation happens
- std::thread::sleep(std::time::Duration::from_secs(15));
- assert_eq!(
- current_media(&api, program_id.into_bytes(), token_id).await,
- links[3]
- );
-
- std::thread::sleep(std::time::Duration::from_secs(15));
- assert_eq!(
- current_media(&api, program_id.into_bytes(), token_id).await,
- links[2]
- );
-
- std::thread::sleep(std::time::Duration::from_secs(15));
- assert_eq!(
- current_media(&api, program_id.into_bytes(), token_id).await,
- links[1]
- );
-
- std::thread::sleep(std::time::Duration::from_secs(15));
- assert_eq!(
- current_media(&api, program_id.into_bytes(), token_id).await,
- links[0]
- );
-
- Ok(())
-}
-
-pub async fn current_media(api: &GearApi, program_id: [u8; 32], token_id: TokenId) -> String {
- let state: State = api.read_state(program_id.into(), vec![]).await.unwrap();
-
- state
- .tokens
- .into_iter()
- .find_map(|(id, meta)| (token_id == id).then_some(meta))
- .unwrap()
- .media_url
-}
diff --git a/contracts/auto-changed-nft/tests/utils.rs b/contracts/auto-changed-nft/tests/utils.rs
deleted file mode 100644
index 84fe38c3e..000000000
--- a/contracts/auto-changed-nft/tests/utils.rs
+++ /dev/null
@@ -1,191 +0,0 @@
-#![allow(dead_code)]
-use auto_changed_nft_io::*;
-use gear_lib_old::non_fungible_token::token::*;
-use gstd::ActorId;
-use gtest::{Program, RunResult, System};
-
-const USERS: &[u64] = &[3, 4, 5];
-
-pub fn init_nft(sys: &System) {
- sys.init_logger();
- let nft = Program::current_opt(sys);
-
- let collection = Collection {
- name: String::from("MyToken"),
- description: String::from("My token"),
- };
-
- let init_nft = InitNFT {
- collection,
- royalties: None,
- config: Config {
- max_mint_count: Some(100),
- authorized_minters: vec![USERS[0].into()],
- },
- };
-
- let res = nft.send(USERS[0], init_nft);
-
- assert!(!res.main_failed());
-}
-
-pub fn mint(nft: &Program<'_>, transaction_id: u64, member: u64) -> RunResult {
- nft.send(
- member,
- NFTAction::Mint {
- transaction_id,
- token_metadata: TokenMetadata {
- name: "CryptoKitty".to_string(),
- description: "Description".to_string(),
- media: "http://".to_string(),
- reference: "http://".to_string(),
- },
- },
- )
-}
-
-pub fn add_minter(
- nft: &Program<'_>,
- transaction_id: u64,
- minter_id: ActorId,
- member: u64,
-) -> RunResult {
- nft.send(
- member,
- NFTAction::AddMinter {
- transaction_id,
- minter_id,
- },
- )
-}
-
-pub fn add_url(nft: &Program<'_>, token_id: TokenId, url: &str, member: u64) -> RunResult {
- nft.send(
- member,
- NFTAction::AddMedia {
- token_id,
- media: url.to_string(),
- },
- )
-}
-
-pub fn start_auto_changing(
- nft: &Program<'_>,
- token_ids: Vec,
- updates_count: u32,
- update_period: u32,
- member: u64,
-) -> RunResult {
- nft.send(
- member,
- NFTAction::StartAutoChanging {
- updates_count,
- update_period,
- token_ids,
- },
- )
-}
-
-pub fn burn(nft: &Program<'_>, transaction_id: u64, member: u64, token_id: u64) -> RunResult {
- nft.send(
- member,
- NFTAction::Burn {
- transaction_id,
- token_id: token_id.into(),
- },
- )
-}
-
-pub fn transfer(
- nft: &Program<'_>,
- transaction_id: u64,
- from: u64,
- to: u64,
- token_id: u64,
-) -> RunResult {
- nft.send(
- from,
- NFTAction::Transfer {
- transaction_id,
- to: to.into(),
- token_id: token_id.into(),
- },
- )
-}
-
-pub fn owner_of(nft: &Program<'_>, from: u64, token_id: u64) -> RunResult {
- nft.send(
- from,
- NFTAction::Owner {
- token_id: token_id.into(),
- },
- )
-}
-
-pub fn is_approved_to(nft: &Program<'_>, from: u64, token_id: u64, to: u64) -> RunResult {
- nft.send(
- from,
- NFTAction::IsApproved {
- to: to.into(),
- token_id: token_id.into(),
- },
- )
-}
-
-pub fn approve(
- nft: &Program<'_>,
- transaction_id: u64,
- from: u64,
- to: u64,
- token_id: u64,
-) -> RunResult {
- nft.send(
- from,
- NFTAction::Approve {
- transaction_id,
- to: to.into(),
- token_id: token_id.into(),
- },
- )
-}
-
-pub fn delegated_approve(
- nft: &Program<'_>,
- transaction_id: u64,
- from: u64,
- message: DelegatedApproveMessage,
- signature: [u8; 64],
-) -> RunResult {
- let action = NFTAction::DelegatedApprove {
- transaction_id,
- message,
- signature,
- };
- nft.send(from, action)
-}
-
-pub fn mint_to_actor(nft: &Program<'_>, transaction_id: u64, member: [u8; 32]) -> RunResult {
- nft.send(
- member,
- NFTAction::Mint {
- transaction_id,
- token_metadata: TokenMetadata {
- name: "CryptoKitty".to_string(),
- description: "Description".to_string(),
- media: "http://".to_string(),
- reference: "http://".to_string(),
- },
- },
- )
-}
-
-pub fn current_media(nft: &Program<'_>, token_id: TokenId) -> String {
- let state: State = nft.read_state(0).unwrap();
-
- state
- .tokens
- .into_iter()
- .find_map(|(id, meta)| (token_id == id).then_some(meta))
- .unwrap()
- .media_url
-}
diff --git a/contracts/battle/Cargo.toml b/contracts/battle/Cargo.toml
new file mode 100644
index 000000000..acd90d1f5
--- /dev/null
+++ b/contracts/battle/Cargo.toml
@@ -0,0 +1,24 @@
+[package]
+name = "battle"
+version.workspace = true
+edition.workspace = true
+publish.workspace = true
+
+[dependencies]
+battle-app = { path = "app" }
+
+[dev-dependencies]
+battle = { path = ".", features = ["wasm-binary"] }
+battle-client = { path = "client" }
+sails-rs = { workspace = true, features = ["gtest"] }
+gtest.workspace = true
+gstd.workspace = true
+tokio = { version = "1.39", features = ["rt", "macros"] }
+
+[build-dependencies]
+battle-app = { path = "app" }
+sails-rs = { workspace = true, features = ["wasm-builder"] }
+sails-idl-gen.workspace = true
+
+[features]
+wasm-binary = []
diff --git a/contracts/battle/README.md b/contracts/battle/README.md
new file mode 100644
index 000000000..3d598d729
--- /dev/null
+++ b/contracts/battle/README.md
@@ -0,0 +1,21 @@
+## The **battle** program
+
+The program workspace includes the following packages:
+- `battle` is the package allowing to build WASM binary for the program and IDL file for it.
+ The package also includes integration tests for the program in the `tests` sub-folder
+- `battle-app` is the package containing business logic for the program represented by the `BattleService` structure.
+- `battle-client` is the package containing the client for the program allowing to interact with it from another program, tests, or
+ off-chain client.
+
+
+### 🏗️ Building
+
+```sh
+cargo b -r -p "battle"
+```
+
+### ✅ Testing
+
+```sh
+cargo t -r -p "battle"
+```
diff --git a/contracts/battle/app/Cargo.toml b/contracts/battle/app/Cargo.toml
new file mode 100644
index 000000000..7f830e554
--- /dev/null
+++ b/contracts/battle/app/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "battle-app"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+gstd = { workspace = true, features = ["debug"] }
+sails-rs.workspace = true
diff --git a/contracts/battle/app/src/lib.rs b/contracts/battle/app/src/lib.rs
new file mode 100644
index 000000000..cd975474b
--- /dev/null
+++ b/contracts/battle/app/src/lib.rs
@@ -0,0 +1,22 @@
+#![no_std]
+#![warn(clippy::new_without_default)]
+mod services;
+
+use crate::services::game::utils::Config;
+use services::game::BattleService;
+
+pub struct Program(());
+
+pub struct BattleProgram(());
+
+#[sails_rs::program]
+impl BattleProgram {
+ pub fn new(config: Config) -> Self {
+ BattleService::init(config);
+ Self(())
+ }
+
+ pub fn battle(&self) -> BattleService {
+ BattleService::new()
+ }
+}
diff --git a/contracts/battle/app/src/services/game/funcs.rs b/contracts/battle/app/src/services/game/funcs.rs
new file mode 100644
index 000000000..40cd6d3d7
--- /dev/null
+++ b/contracts/battle/app/src/services/game/funcs.rs
@@ -0,0 +1,946 @@
+use crate::services::game::{
+ Appearance, Battle, BattleError, BattleResult, Config, Event, Move, Pair, Player,
+ PlayerSettings, State, Storage,
+};
+use gstd::{exec, prelude::*, ReservationId};
+use sails_rs::{gstd::msg, prelude::*};
+
+async fn check_owner(warrior_id: ActorId, msg_src: ActorId) -> Result<(), BattleError> {
+ let request = [
+ "Warrior".encode(),
+ "GetOwner".to_string().encode(),
+ ().encode(),
+ ]
+ .concat();
+
+ let (_, _, owner): (String, String, ActorId) =
+ msg::send_bytes_with_gas_for_reply_as(warrior_id, request, 10_000_000_000, 0, 0)
+ .ok()
+ .ok_or(BattleError::SendingMessageToWarrior)?
+ .await
+ .ok()
+ .ok_or(BattleError::GetWarriorOwner)?;
+
+ if owner != msg_src {
+ return Err(BattleError::NotOwnerOfWarrior);
+ }
+ Ok(())
+}
+
+async fn get_appearance(warrior_id: ActorId) -> Result {
+ let request = [
+ "Warrior".encode(),
+ "GetAppearance".to_string().encode(),
+ ().encode(),
+ ]
+ .concat();
+
+ let (_, _, appearance): (String, String, Appearance) =
+ msg::send_bytes_with_gas_for_reply_as(warrior_id, request, 5_000_000_000, 0, 0)
+ .ok()
+ .ok_or(BattleError::SendingMessageToWarrior)?
+ .await
+ .ok()
+ .ok_or(BattleError::GetWarriorOwner)?;
+
+ Ok(appearance)
+}
+
+pub async fn create_new_battle(
+ storage: &mut Storage,
+ warrior_id: Option,
+ appearance: Option,
+ battle_name: String,
+ user_name: String,
+ attack: u16,
+ defence: u16,
+ dodge: u16,
+) -> Result {
+ let msg_src = msg::source();
+ let msg_value = msg::value();
+
+ let reply = create(
+ storage,
+ warrior_id,
+ appearance,
+ user_name,
+ battle_name,
+ attack,
+ defence,
+ dodge,
+ msg_src,
+ msg_value,
+ )
+ .await;
+ if reply.is_err() {
+ msg::send_with_gas(msg_src, "", 0, msg_value).expect("Error in sending the value");
+ }
+ reply
+}
+
+async fn create(
+ storage: &mut Storage,
+ warrior_id: Option,
+ appearance: Option,
+ user_name: String,
+ battle_name: String,
+ attack: u16,
+ defence: u16,
+ dodge: u16,
+ msg_src: ActorId,
+ msg_value: u128,
+) -> Result {
+ let time_creation = exec::block_timestamp();
+ check_player_settings(attack, defence, dodge, &storage.config)?;
+ let appearance = if let Some(id) = warrior_id {
+ check_owner(id, msg_src).await?;
+ get_appearance(id).await?
+ } else if let Some(app) = appearance {
+ app
+ } else {
+ return Err(BattleError::IdAndAppearanceIsNone);
+ };
+
+ if storage.battles.contains_key(&msg_src) {
+ return Err(BattleError::AlreadyHaveBattle);
+ }
+
+ let mut battle = Battle::default();
+ let player = Player {
+ warrior_id,
+ appearance,
+ owner: msg_src,
+ user_name: user_name.clone(),
+ player_settings: PlayerSettings {
+ health: storage.config.health,
+ attack,
+ defence: defence * 10,
+ dodge: dodge * 4,
+ },
+ number_of_victories: 0,
+ ultimate_reload: 0,
+ reflect_reload: 0,
+ };
+ battle.participants.insert(msg_src, player);
+ battle.bid = msg_value;
+ battle.admin = msg_src;
+ battle.time_creation = time_creation;
+ battle.battle_name = battle_name;
+ storage.battles.insert(msg_src, battle);
+ storage.players_to_battle_id.insert(msg_src, msg_src);
+
+ send_delayed_message_for_cancel_tournament(
+ msg_src,
+ time_creation,
+ storage.config.gas_to_cancel_the_battle,
+ storage.config.time_to_cancel_the_battle,
+ );
+ Ok(Event::NewBattleCreated {
+ battle_id: msg_src,
+ bid: msg_value,
+ })
+}
+
+pub async fn battle_registration(
+ storage: &mut Storage,
+ admin_id: ActorId,
+ warrior_id: Option,
+ appearance: Option,
+ user_name: String,
+ attack: u16,
+ defence: u16,
+ dodge: u16,
+) -> Result {
+ let msg_src = msg::source();
+ let msg_value = msg::value();
+
+ let reply = register(
+ storage, admin_id, warrior_id, appearance, user_name, attack, defence, dodge, msg_src,
+ msg_value,
+ )
+ .await;
+ if reply.is_err() {
+ msg::send_with_gas(msg_src, "", 0, msg_value).expect("Error in sending the value");
+ }
+ reply
+}
+
+async fn register(
+ storage: &mut Storage,
+ admin_id: ActorId,
+ warrior_id: Option,
+ appearance: Option,
+ user_name: String,
+ attack: u16,
+ defence: u16,
+ dodge: u16,
+ msg_src: ActorId,
+ msg_value: u128,
+) -> Result {
+ check_player_settings(attack, defence, dodge, &storage.config)?;
+
+ let appearance = if let Some(id) = warrior_id {
+ check_owner(id, msg_src).await?;
+ get_appearance(id).await?
+ } else if let Some(app) = appearance {
+ app
+ } else {
+ return Err(BattleError::IdAndAppearanceIsNone);
+ };
+
+ if storage.players_to_battle_id.contains_key(&msg_src) {
+ return Err(BattleError::SeveralRegistrations);
+ }
+ let battle = storage
+ .battles
+ .get_mut(&admin_id)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ if battle.state != State::Registration {
+ return Err(BattleError::WrongState);
+ }
+ if battle.participants.len() >= storage.config.max_participants.into() {
+ return Err(BattleError::BattleFull);
+ }
+ if battle.bid != msg_value {
+ return Err(BattleError::WrongBid);
+ }
+
+ let reservation_id = ReservationId::reserve(
+ storage.config.reservation_amount,
+ storage.config.reservation_time,
+ )
+ .expect("Reservation across executions");
+
+ battle.reservation.insert(msg_src, reservation_id);
+ battle.participants.insert(
+ msg_src,
+ Player {
+ warrior_id,
+ appearance,
+ owner: msg_src,
+ user_name: user_name.clone(),
+ player_settings: PlayerSettings {
+ health: storage.config.health,
+ attack,
+ defence: defence * 10,
+ dodge: dodge * 4,
+ },
+ number_of_victories: 0,
+ ultimate_reload: 0,
+ reflect_reload: 0,
+ },
+ );
+ storage.players_to_battle_id.insert(msg_src, admin_id);
+ Ok(Event::PlayerRegistered {
+ admin_id,
+ user_name,
+ bid: msg_value,
+ })
+}
+
+pub fn cancel_register(storage: &mut Storage) -> Result {
+ let msg_src = msg::source();
+ let admin_id = storage
+ .players_to_battle_id
+ .get(&msg_src)
+ .ok_or(BattleError::NoSuchPlayer)?;
+
+ let battle = storage
+ .battles
+ .get_mut(admin_id)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ if battle.admin == msg_src {
+ return Err(BattleError::AccessDenied);
+ }
+ if battle.state != State::Registration {
+ return Err(BattleError::WrongState);
+ }
+ let reservation_id = battle
+ .reservation
+ .get(&msg_src)
+ .ok_or(BattleError::NoSuchReservation)?;
+
+ if battle.bid != 0 {
+ msg::send_with_gas(msg_src, "", 0, battle.bid).expect("Error in sending the value");
+ }
+ reservation_id
+ .unreserve()
+ .expect("Unreservation across executions");
+ battle.reservation.remove(&msg_src);
+ battle.participants.remove(&msg_src);
+ storage.players_to_battle_id.remove(&msg_src);
+
+ Ok(Event::RegisterCanceled { player_id: msg_src })
+}
+
+pub fn delete_player(storage: &mut Storage, player_id: ActorId) -> Result {
+ let msg_src = msg::source();
+ let admin_id = storage
+ .players_to_battle_id
+ .get(&msg_src)
+ .ok_or(BattleError::NoSuchPlayer)?;
+
+ let battle = storage
+ .battles
+ .get_mut(admin_id)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ if battle.admin != msg_src {
+ return Err(BattleError::AccessDenied);
+ }
+
+ if battle.state != State::Registration {
+ return Err(BattleError::WrongState);
+ }
+
+ if !battle.participants.contains_key(&player_id) {
+ return Err(BattleError::NoSuchPlayer);
+ }
+
+ let reservation_id = battle
+ .reservation
+ .get(&player_id)
+ .ok_or(BattleError::NoSuchReservation)?;
+
+ if battle.bid != 0 {
+ msg::send_with_gas(player_id, "", 0, battle.bid).expect("Error in sending the value");
+ }
+ reservation_id
+ .unreserve()
+ .expect("Unreservation across executions");
+ battle.reservation.remove(&player_id);
+ battle.participants.remove(&player_id);
+ storage.players_to_battle_id.remove(&player_id);
+
+ Ok(Event::RegisterCanceled { player_id })
+}
+
+pub fn cancel_tournament(storage: &mut Storage) -> Result {
+ let msg_src = msg::source();
+ let battle = storage
+ .battles
+ .get(&msg_src)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ let game_is_over = matches!(battle.state, State::GameIsOver { .. });
+
+ battle.participants.iter().for_each(|(id, _)| {
+ if !game_is_over && battle.bid != 0 {
+ msg::send_with_gas(*id, "", 0, battle.bid).expect("Error in sending the value");
+ }
+ storage.players_to_battle_id.remove(id);
+ });
+
+ battle.defeated_participants.iter().for_each(|(id, _)| {
+ if !game_is_over && battle.bid != 0 {
+ msg::send_with_gas(*id, "", 0, battle.bid).expect("Error in sending the value");
+ }
+ storage.players_to_battle_id.remove(id);
+ });
+
+ battle.reservation.iter().for_each(|(_, id)| {
+ let _ = id.unreserve();
+ });
+
+ storage.battles.remove(&msg_src);
+
+ Ok(Event::BattleCanceled { game_id: msg_src })
+}
+
+pub fn delayed_cancel_tournament(
+ storage: &mut Storage,
+ game_id: ActorId,
+ time_creation: u64,
+) -> Result {
+ if msg::source() != exec::program_id() {
+ return Err(BattleError::AccessDenied);
+ }
+
+ let battle = storage
+ .battles
+ .get(&game_id)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ if battle.time_creation != time_creation {
+ return Err(BattleError::WrongTimeCreation);
+ }
+ if !matches!(battle.state, State::Registration) {
+ return Err(BattleError::WrongState);
+ }
+ battle.participants.iter().for_each(|(id, _)| {
+ if battle.bid != 0 {
+ msg::send_with_gas(*id, "", 0, battle.bid).expect("Error in sending the value");
+ }
+ storage.players_to_battle_id.remove(id);
+ });
+
+ battle.reservation.iter().for_each(|(_, id)| {
+ let _ = id.unreserve();
+ });
+
+ storage.battles.remove(&game_id);
+
+ Ok(Event::BattleCanceled { game_id })
+}
+
+pub fn start_battle(storage: &mut Storage) -> Result {
+ let msg_src = msg::source();
+ let battle = storage
+ .battles
+ .get_mut(&msg_src)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ let reservation_id = ReservationId::reserve(
+ storage.config.reservation_amount,
+ storage.config.reservation_time,
+ )
+ .expect("Reservation across executions");
+
+ battle.reservation.insert(msg_src, reservation_id);
+
+ match battle.state {
+ State::Registration => {
+ battle.check_min_player_amount()?;
+ battle.split_into_pairs()?;
+ battle.send_delayed_message_make_move_from_reservation(
+ storage.config.time_for_move_in_blocks,
+ );
+ battle.state = State::Started;
+ }
+ _ => return Err(BattleError::WrongState),
+ }
+ Ok(Event::BattleStarted)
+}
+
+pub fn automatic_move(
+ storage: &mut Storage,
+ player_id: ActorId,
+ number_of_victories: u8,
+ round: u8,
+) -> Result {
+ if msg::source() != exec::program_id() {
+ return Err(BattleError::AccessDenied);
+ }
+ let game_id = storage
+ .players_to_battle_id
+ .get(&player_id)
+ .ok_or(BattleError::NoSuchGame)?;
+ let battle = storage
+ .battles
+ .get_mut(game_id)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ battle.check_state(State::Started)?;
+ let player = battle
+ .participants
+ .get(&player_id)
+ .ok_or(BattleError::NoSuchPlayer)?;
+ // check the number of victories, if equal, then the game is not over
+ if player.number_of_victories == number_of_victories {
+ let pair_id = battle
+ .players_to_pairs
+ .get(&player_id)
+ .ok_or(BattleError::NoSuchPair)?;
+ let pair = battle
+ .pairs
+ .get_mut(pair_id)
+ .ok_or(BattleError::NoSuchPair)?;
+
+ // round check
+ if round == pair.round {
+ if let Some(opponent_info) = pair.action {
+ if opponent_info.0 == player_id {
+ send_delayed_automatic_move(
+ player_id,
+ number_of_victories,
+ pair.round,
+ storage.config.time_for_move_in_blocks,
+ );
+ return Ok(Event::AutomaticMoveMade);
+ }
+ let player_1_ptr = battle
+ .participants
+ .get_mut(&opponent_info.0)
+ .expect("The player must exist") as *mut _;
+ let player_2_ptr = battle
+ .participants
+ .get_mut(&player_id)
+ .expect("The player must exist") as *mut _;
+
+ let (round_result, player_1, player_2) = unsafe {
+ let player_1 = &mut *player_1_ptr;
+ let player_2 = &mut *player_2_ptr;
+
+ (
+ pair.recap_round((player_1, opponent_info.1), (player_2, Move::Attack)),
+ player_1,
+ player_2,
+ )
+ };
+ pair.action = None;
+ let current_round = pair.round;
+ let (player_1_health, player_2_health) = if let Some(battle_result) = round_result {
+ match battle_result {
+ BattleResult::PlayerWin(winner) => {
+ let loser = pair.get_opponent(&winner);
+ let player_loser = battle
+ .participants
+ .remove(&loser)
+ .expect("The player must exist");
+ let player_winner = battle
+ .participants
+ .get_mut(&winner)
+ .expect("The player must exist");
+
+ let healths = if player_1.owner == winner {
+ (player_winner.player_settings.health, 0)
+ } else {
+ (0, player_winner.player_settings.health)
+ };
+ player_winner.player_settings.health = storage.config.health;
+ player_winner.reflect_reload = 0;
+ player_winner.ultimate_reload = 0;
+ player_winner.number_of_victories += 1;
+ battle.defeated_participants.insert(loser, player_loser);
+ battle.pairs.remove(pair_id);
+ battle.players_to_pairs.remove(&winner);
+ battle.players_to_pairs.remove(&loser);
+ battle.check_end_game();
+ healths
+ }
+ BattleResult::Draw(id_1, id_2) => {
+ let player_1 = battle
+ .participants
+ .get_mut(&id_1)
+ .expect("The player must exist");
+ player_1.player_settings.health = storage.config.health;
+ player_1.reflect_reload = 0;
+ player_1.ultimate_reload = 0;
+ let player_2 = battle
+ .participants
+ .get_mut(&id_2)
+ .expect("The player must exist");
+
+ player_2.player_settings.health = storage.config.health;
+ player_2.reflect_reload = 0;
+ player_2.ultimate_reload = 0;
+ battle.pairs.remove(pair_id);
+ battle.players_to_pairs.remove(&id_1);
+ battle.players_to_pairs.remove(&id_2);
+ battle.check_draw_end_game();
+ (0, 0)
+ }
+ }
+ } else {
+ pair.round += 1;
+ pair.round_start_time = exec::block_timestamp();
+ send_delayed_automatic_move(
+ player_id,
+ number_of_victories,
+ pair.round,
+ storage.config.time_for_move_in_blocks,
+ );
+ (
+ player_1.player_settings.health,
+ player_2.player_settings.health,
+ )
+ };
+
+ return Ok(Event::RoundAction {
+ round: current_round,
+ player_1: (opponent_info.0, opponent_info.1, player_1_health),
+ player_2: (player_id, Move::Attack, player_2_health),
+ });
+ } else {
+ pair.action = Some((player_id, Move::Attack));
+ send_delayed_automatic_move(
+ player_id,
+ number_of_victories,
+ pair.round + 1,
+ storage.config.time_for_move_in_blocks,
+ );
+ }
+ } else {
+ // if the round is different, we need to see when it started and calculate the time for the next pending message
+ let delay = storage.config.time_for_move_in_blocks
+ - ((exec::block_timestamp() - pair.round_start_time)
+ / storage.config.block_duration_ms as u64) as u32
+ + 1;
+
+ send_delayed_automatic_move(player_id, number_of_victories, pair.round, delay);
+ }
+ }
+
+ Ok(Event::AutomaticMoveMade)
+}
+
+pub fn make_move(storage: &mut Storage, warrior_move: Move) -> Result {
+ let player = msg::source();
+ let game_id = storage
+ .players_to_battle_id
+ .get(&player)
+ .ok_or(BattleError::NoSuchGame)?;
+ let battle = storage
+ .battles
+ .get_mut(game_id)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ battle.check_state(State::Started)?;
+
+ let pair_id = battle
+ .players_to_pairs
+ .get(&player)
+ .ok_or(BattleError::NoSuchPair)?;
+ let pair = battle
+ .pairs
+ .get_mut(pair_id)
+ .ok_or(BattleError::NoSuchPair)?;
+
+ let timestamp = exec::block_timestamp();
+ let time_for_move_ms =
+ storage.config.block_duration_ms * storage.config.time_for_move_in_blocks;
+ if timestamp.saturating_sub(pair.round_start_time) >= time_for_move_ms as u64 {
+ return Err(BattleError::TimeExpired);
+ }
+ match warrior_move {
+ Move::Ultimate => check_reload_ultimate(
+ battle
+ .participants
+ .get(&player)
+ .expect("The player must exist"),
+ )?,
+ Move::Reflect => check_reload_reflect(
+ battle
+ .participants
+ .get(&player)
+ .expect("The player must exist"),
+ )?,
+ Move::Attack => (),
+ }
+
+ if let Some(opponent_info) = pair.action {
+ if opponent_info.0 == player {
+ return Err(BattleError::MoveHasAlreadyBeenMade);
+ }
+
+ let player_1_ptr = battle
+ .participants
+ .get_mut(&opponent_info.0)
+ .expect("The player must exist") as *mut _;
+ let player_2_ptr = battle
+ .participants
+ .get_mut(&player)
+ .expect("The player must exist") as *mut _;
+
+ let (round_result, player_1, player_2) = unsafe {
+ let player_1 = &mut *player_1_ptr;
+ let player_2 = &mut *player_2_ptr;
+
+ (
+ pair.recap_round((player_1, opponent_info.1), (player_2, warrior_move)),
+ player_1,
+ player_2,
+ )
+ };
+ pair.action = None;
+ let current_round = pair.round;
+ let (player_1_health, player_2_health) = if let Some(battle_result) = round_result {
+ match battle_result {
+ BattleResult::PlayerWin(winner) => {
+ let loser = pair.get_opponent(&winner);
+ let player_loser = battle
+ .participants
+ .remove(&loser)
+ .expect("The player must exist");
+ battle.defeated_participants.insert(loser, player_loser);
+ let player_winner = battle
+ .participants
+ .get_mut(&winner)
+ .expect("The player must exist");
+ let healths = if player_1.owner == winner {
+ (player_winner.player_settings.health, 0)
+ } else {
+ (0, player_winner.player_settings.health)
+ };
+ player_winner.player_settings.health = storage.config.health;
+ player_winner.reflect_reload = 0;
+ player_winner.ultimate_reload = 0;
+ player_winner.number_of_victories += 1;
+ battle.pairs.remove(pair_id);
+ battle.players_to_pairs.remove(&winner);
+ battle.players_to_pairs.remove(&loser);
+ battle.check_end_game();
+ healths
+ }
+ BattleResult::Draw(id_1, id_2) => {
+ let player_1 = battle
+ .participants
+ .get_mut(&id_1)
+ .expect("The player must exist");
+ player_1.player_settings.health = storage.config.health;
+ player_1.reflect_reload = 0;
+ player_1.ultimate_reload = 0;
+ let player_2 = battle
+ .participants
+ .get_mut(&id_2)
+ .expect("The player must exist");
+
+ player_2.player_settings.health = storage.config.health;
+ player_2.reflect_reload = 0;
+ player_2.ultimate_reload = 0;
+ battle.pairs.remove(pair_id);
+ battle.players_to_pairs.remove(&id_1);
+ battle.players_to_pairs.remove(&id_2);
+ battle.check_draw_end_game();
+ (0, 0)
+ }
+ }
+ } else {
+ pair.round += 1;
+ pair.round_start_time = exec::block_timestamp();
+ (
+ player_1.player_settings.health,
+ player_2.player_settings.health,
+ )
+ };
+ Ok(Event::RoundAction {
+ round: current_round,
+ player_1: (opponent_info.0, opponent_info.1, player_1_health),
+ player_2: (player, warrior_move, player_2_health),
+ })
+ } else {
+ pair.action = Some((player, warrior_move));
+ Ok(Event::MoveMade)
+ }
+}
+
+pub fn start_next_fight(storage: &mut Storage) -> Result {
+ let player_id = msg::source();
+ let game_id = storage
+ .players_to_battle_id
+ .get(&player_id)
+ .ok_or(BattleError::NoSuchGame)?;
+ let battle = storage
+ .battles
+ .get_mut(game_id)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ battle.check_state(State::Started)?;
+
+ if battle.players_to_pairs.contains_key(&player_id) {
+ return Err(BattleError::AlreadyHaveBattle);
+ }
+
+ let reservation_id = ReservationId::reserve(
+ storage.config.reservation_amount,
+ storage.config.reservation_time,
+ )
+ .expect("Reservation across executions");
+
+ battle.reservation.insert(player_id, reservation_id);
+
+ let player = battle
+ .participants
+ .get(&player_id)
+ .ok_or(BattleError::NoSuchPlayer)?;
+
+ if let Some((opponent, pair_id)) = battle.waiting_player {
+ let pair = battle
+ .pairs
+ .get_mut(&pair_id)
+ .expect("The pair must be created");
+ pair.player_2 = player.owner;
+ pair.round_start_time = exec::block_timestamp();
+ battle.players_to_pairs.insert(player.owner, pair_id);
+ battle.waiting_player = None;
+ send_delayed_message_make_move_from_reservation(
+ reservation_id,
+ storage.config.time_for_move_in_blocks,
+ player_id,
+ player.number_of_victories,
+ );
+
+ let reservation_id = battle
+ .reservation
+ .get(&opponent)
+ .expect("Reservation must be exist");
+ let opponent_player = battle
+ .participants
+ .get(&opponent)
+ .expect("Player must be exist");
+ send_delayed_message_make_move_from_reservation(
+ *reservation_id,
+ storage.config.time_for_move_in_blocks,
+ opponent_player.owner,
+ opponent_player.number_of_victories,
+ );
+ Ok(Event::NextBattleStarted)
+ } else {
+ let pair = Pair {
+ player_1: player.owner,
+ round: 1,
+ ..Default::default()
+ };
+ battle.pairs.insert(battle.pair_id, pair);
+ battle.players_to_pairs.insert(player.owner, battle.pair_id);
+ battle.waiting_player = Some((player.owner, battle.pair_id));
+ battle.pair_id += 1;
+ Ok(Event::EnemyWaiting)
+ }
+}
+
+pub fn exit_game(storage: &mut Storage) -> Result {
+ let player_id = msg::source();
+ let game_id = storage
+ .players_to_battle_id
+ .get(&player_id)
+ .ok_or(BattleError::NoSuchGame)?;
+ let battle = storage
+ .battles
+ .get_mut(game_id)
+ .ok_or(BattleError::NoSuchGame)?;
+
+ if battle.defeated_participants.contains_key(&player_id) {
+ storage.players_to_battle_id.remove(&player_id);
+ } else {
+ let player = battle
+ .participants
+ .get(&player_id)
+ .expect("The player must exist");
+ if let Some(pair_id) = battle.players_to_pairs.get(&player_id) {
+ let pair = battle.pairs.remove(pair_id).expect("The pair must exist");
+
+ battle.players_to_pairs.remove(&player_id);
+ battle
+ .defeated_participants
+ .insert(player_id, player.clone());
+
+ let opponent_id = pair.get_opponent(&player_id);
+ battle.players_to_pairs.remove(&opponent_id);
+ let opponent = battle
+ .participants
+ .get_mut(&opponent_id)
+ .expect("The player must exist");
+
+ opponent.number_of_victories += 1;
+ opponent.player_settings.health = storage.config.health;
+
+ battle.participants.remove(&player_id);
+ storage.players_to_battle_id.remove(&player_id);
+ battle.check_end_game();
+ } else {
+ if let Some((id, _)) = battle.waiting_player {
+ if id == player_id {
+ battle.waiting_player = None;
+ }
+ }
+ battle
+ .defeated_participants
+ .insert(player_id, player.clone());
+ battle.participants.remove(&player_id);
+ storage.players_to_battle_id.remove(&player_id);
+ }
+ }
+ Ok(Event::GameLeft)
+}
+
+fn check_reload_ultimate(player: &Player) -> Result<(), BattleError> {
+ if player.ultimate_reload != 0 {
+ return Err(BattleError::UltimateReload);
+ }
+ Ok(())
+}
+
+fn check_reload_reflect(player: &Player) -> Result<(), BattleError> {
+ if player.reflect_reload != 0 {
+ return Err(BattleError::ReflectReload);
+ }
+ Ok(())
+}
+
+fn check_player_settings(
+ attack: u16,
+ defence: u16,
+ dodge: u16,
+ config: &Config,
+) -> Result<(), BattleError> {
+ let attack_in_range = config.attack_range.0 <= attack && attack <= config.attack_range.1;
+ let defence_in_range = config.defence_range.0 <= defence && defence <= config.defence_range.1;
+ let dodge_in_range = config.dodge_range.0 <= dodge && dodge <= config.dodge_range.1;
+
+ let total_points = attack + defence + dodge
+ - config.attack_range.0
+ - config.defence_range.0
+ - config.dodge_range.0;
+
+ if !(attack_in_range
+ && defence_in_range
+ && dodge_in_range
+ && total_points == config.available_points)
+ {
+ return Err(BattleError::MisallocationOfPoints);
+ }
+ Ok(())
+}
+
+fn send_delayed_message_make_move_from_reservation(
+ reservation_id: ReservationId,
+ time_for_move: u32,
+ player_id: ActorId,
+ number_of_victories: u8,
+) {
+ let round: u8 = 1;
+ let request = [
+ "Battle".encode(),
+ "AutomaticMove".to_string().encode(),
+ (player_id, number_of_victories, round).encode(),
+ ]
+ .concat();
+
+ msg::send_bytes_delayed_from_reservation(
+ reservation_id,
+ exec::program_id(),
+ request,
+ 0,
+ time_for_move,
+ )
+ .expect("Error in sending message");
+}
+
+fn send_delayed_automatic_move(player_id: ActorId, number_of_victories: u8, round: u8, delay: u32) {
+ let gas = exec::gas_available() - 5_000_000_000;
+ let request = [
+ "Battle".encode(),
+ "AutomaticMove".to_string().encode(),
+ (player_id, number_of_victories, round).encode(),
+ ]
+ .concat();
+
+ msg::send_bytes_with_gas_delayed(exec::program_id(), request, gas, 0, delay)
+ .expect("Error in sending message");
+}
+
+fn send_delayed_message_for_cancel_tournament(
+ game_id: ActorId,
+ time_creation: u64,
+ gas_to_cancel_the_battle: u64,
+ time_to_cancel_the_battle: u32,
+) {
+ let request = [
+ "Battle".encode(),
+ "DelayedCancelTournament".to_string().encode(),
+ (Some((game_id, time_creation))).encode(),
+ ]
+ .concat();
+
+ msg::send_bytes_with_gas_delayed(
+ exec::program_id(),
+ request,
+ gas_to_cancel_the_battle,
+ 0,
+ time_to_cancel_the_battle,
+ )
+ .expect("Error in sending message");
+}
diff --git a/contracts/battle/app/src/services/game/mod.rs b/contracts/battle/app/src/services/game/mod.rs
new file mode 100644
index 000000000..009f23283
--- /dev/null
+++ b/contracts/battle/app/src/services/game/mod.rs
@@ -0,0 +1,250 @@
+#![allow(clippy::too_many_arguments)]
+#![allow(clippy::new_without_default)]
+use crate::services;
+use sails_rs::{
+ collections::{HashMap, HashSet},
+ gstd::{msg, service},
+ prelude::*,
+};
+mod funcs;
+pub mod utils;
+use utils::Config;
+use utils::*;
+
+#[derive(Debug, Default, Clone)]
+struct Storage {
+ battles: HashMap,
+ players_to_battle_id: HashMap,
+ admins: HashSet,
+ config: Config,
+}
+
+static mut STORAGE: Option = None;
+
+#[derive(Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub enum Event {
+ NewBattleCreated {
+ battle_id: ActorId,
+ bid: u128,
+ },
+ PlayerRegistered {
+ admin_id: ActorId,
+ user_name: String,
+ bid: u128,
+ },
+ RegisterCanceled {
+ player_id: ActorId,
+ },
+ BattleCanceled {
+ game_id: ActorId,
+ },
+ BattleStarted,
+ MoveMade,
+ BattleFinished {
+ winner: ActorId,
+ },
+ PairChecked {
+ game_id: ActorId,
+ pair_id: u8,
+ round: u8,
+ },
+ FirstRoundChecked {
+ game_id: ActorId,
+ wave: u8,
+ },
+ NextBattleStarted,
+ EnemyWaiting,
+ WarriorGenerated {
+ address: ActorId,
+ },
+ AdminAdded {
+ new_admin: ActorId,
+ },
+ ConfigChanged {
+ config: Config,
+ },
+ GameLeft,
+ RoundAction {
+ round: u8,
+ player_1: (ActorId, Move, u16),
+ player_2: (ActorId, Move, u16),
+ },
+ AutomaticMoveMade,
+}
+
+#[derive(Clone)]
+pub struct BattleService(());
+
+impl BattleService {
+ pub fn init(config: Config) -> Self {
+ unsafe {
+ STORAGE = Some(Storage {
+ admins: HashSet::from([msg::source()]),
+ config,
+ ..Default::default()
+ });
+ }
+ Self(())
+ }
+ fn get_mut(&mut self) -> &'static mut Storage {
+ unsafe { STORAGE.as_mut().expect("Storage is not initialized") }
+ }
+ fn get(&self) -> &'static Storage {
+ unsafe { STORAGE.as_ref().expect("Storage is not initialized") }
+ }
+}
+
+#[service(events = Event)]
+impl BattleService {
+ pub fn new() -> Self {
+ Self(())
+ }
+
+ pub async fn create_new_battle(
+ &mut self,
+ battle_name: String,
+ user_name: String,
+ warrior_id: Option,
+ appearance: Option,
+ attack: u16,
+ defence: u16,
+ dodge: u16,
+ ) {
+ let storage = self.get_mut();
+ let res = funcs::create_new_battle(
+ storage,
+ warrior_id,
+ appearance,
+ battle_name,
+ user_name,
+ attack,
+ defence,
+ dodge,
+ )
+ .await;
+ let event = match res {
+ Ok(v) => v,
+ Err(e) => services::utils::panic(e),
+ };
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub async fn register(
+ &mut self,
+ game_id: ActorId,
+ warrior_id: Option,
+ appearance: Option,
+ user_name: String,
+ attack: u16,
+ defence: u16,
+ dodge: u16,
+ ) {
+ let storage = self.get_mut();
+ let res = funcs::battle_registration(
+ storage, game_id, warrior_id, appearance, user_name, attack, defence, dodge,
+ )
+ .await;
+ let event = match res {
+ Ok(v) => v,
+ Err(e) => services::utils::panic(e),
+ };
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn cancel_register(&mut self) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| funcs::cancel_register(storage));
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn delete_player(&mut self, player_id: ActorId) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| funcs::delete_player(storage, player_id));
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn cancel_tournament(&mut self) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| funcs::cancel_tournament(storage));
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn delayed_cancel_tournament(&mut self, game_id: ActorId, time_creation: u64) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| {
+ funcs::delayed_cancel_tournament(storage, game_id, time_creation)
+ });
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn start_battle(&mut self) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| funcs::start_battle(storage));
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn make_move(&mut self, warrior_move: Move) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| funcs::make_move(storage, warrior_move));
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn automatic_move(&mut self, player_id: ActorId, number_of_victories: u8, round: u8) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| {
+ funcs::automatic_move(storage, player_id, number_of_victories, round)
+ });
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn start_next_fight(&mut self) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| funcs::start_next_fight(storage));
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn exit_game(&mut self) {
+ let storage = self.get_mut();
+ let event = services::utils::panicking(|| funcs::exit_game(storage));
+ self.notify_on(event.clone()).expect("Notification Error");
+ }
+ pub fn add_admin(&mut self, new_admin: ActorId) {
+ let storage = self.get_mut();
+ if !storage.admins.contains(&msg::source()) {
+ services::utils::panic(BattleError::AccessDenied);
+ }
+ storage.admins.insert(new_admin);
+ self.notify_on(Event::AdminAdded { new_admin })
+ .expect("Notification Error");
+ }
+ pub fn change_config(&mut self, config: Config) {
+ let storage = self.get_mut();
+ if !storage.admins.contains(&msg::source()) {
+ services::utils::panic(BattleError::AccessDenied);
+ }
+ storage.config = config.clone();
+ self.notify_on(Event::ConfigChanged { config })
+ .expect("Notification Error");
+ }
+
+ pub fn get_battle(&self, game_id: ActorId) -> Option {
+ let storage = self.get();
+ storage
+ .battles
+ .get(&game_id)
+ .cloned()
+ .map(|battle| battle.into())
+ }
+ pub fn get_my_battle(&self) -> Option {
+ let storage = self.get();
+ if let Some(game_id) = storage.players_to_battle_id.get(&msg::source()) {
+ storage
+ .battles
+ .get(game_id)
+ .cloned()
+ .map(|battle| battle.into())
+ } else {
+ None
+ }
+ }
+ pub fn admins(&self) -> Vec {
+ let storage = self.get();
+ storage.admins.clone().into_iter().collect()
+ }
+ pub fn config(&self) -> &'static Config {
+ let storage = self.get();
+ &storage.config
+ }
+}
diff --git a/contracts/battle/app/src/services/game/utils.rs b/contracts/battle/app/src/services/game/utils.rs
new file mode 100644
index 000000000..4a15c9f06
--- /dev/null
+++ b/contracts/battle/app/src/services/game/utils.rs
@@ -0,0 +1,558 @@
+use gstd::{exec, msg, ReservationId};
+use sails_rs::{collections::HashMap, prelude::*};
+
+pub type PairId = u16;
+static mut SEED: u8 = 0;
+
+pub fn get_random_value(range: u8) -> u8 {
+ if range == 0 {
+ return 0;
+ }
+ let seed = unsafe { SEED };
+ unsafe { SEED = SEED.wrapping_add(1) };
+ let random_input: [u8; 32] = [seed; 32];
+ let (random, _) = exec::random(random_input).expect("Error in getting random number");
+ random[0] % range
+}
+pub fn get_random_dodge(chance: u8) -> bool {
+ assert!(chance <= 100, "The chance must be between 0 and 100");
+ let random_value = get_random_value(101);
+ random_value < chance
+}
+
+#[derive(Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub enum BattleError {
+ ProgramInitializationFailedWithContext(String),
+ AlreadyHaveBattle,
+ NotOwnerOfWarrior,
+ SendingMessageToWarrior,
+ GetWarriorOwner,
+ SeveralRegistrations,
+ NoSuchGame,
+ NoSuchPair,
+ WrongState,
+ WrongBid,
+ NoSuchPlayer,
+ AccessDenied,
+ BattleFull,
+ NotEnoughPlayers,
+ NotAdmin,
+ PlayerDoesNotExist,
+ PairDoesNotExist,
+ GameIsOver,
+ NotWarriorOwner,
+ NotPlayerGame,
+ NoGamesForPlayer,
+ TimeExpired,
+ MoveHasAlreadyBeenMade,
+ NoSuchReservation,
+ WrongTimeCreation,
+ UltimateReload,
+ ReflectReload,
+ MisallocationOfPoints,
+ IdAndAppearanceIsNone,
+}
+
+#[derive(Debug, Default, Clone)]
+pub struct Battle {
+ pub admin: ActorId,
+ pub battle_name: String,
+ pub time_creation: u64,
+ pub bid: u128,
+ pub participants: HashMap,
+ pub defeated_participants: HashMap,
+ pub state: State,
+ pub pairs: HashMap,
+ pub players_to_pairs: HashMap,
+ pub reservation: HashMap,
+ pub waiting_player: Option<(ActorId, PairId)>,
+ pub pair_id: u16,
+}
+
+impl Battle {
+ pub fn check_end_game(&mut self) {
+ if self.participants.len() == 1 {
+ if let Some((&winner, _)) = self.participants.iter().next() {
+ if self.bid != 0 {
+ msg::send_with_gas(
+ winner,
+ "",
+ 10_000,
+ self.bid * (self.defeated_participants.len() + 1) as u128,
+ )
+ .expect("Error send value");
+ // TODO: uncomment and switch https://github.com/gear-tech/gear/pull/4270
+ // msg::send_with_gas(winner, "", 0, self.bid * (self.defeated_participants.len() + 1) as u128).expect("Error send value");
+ }
+ self.state = State::GameIsOver {
+ winners: (winner, None),
+ };
+ }
+ }
+ }
+
+ pub fn check_draw_end_game(&mut self) {
+ if self.participants.len() == 2 {
+ let mut winners: Vec = Vec::with_capacity(2);
+ let prize = self.bid * (self.defeated_participants.len() + 2) as u128 / 2;
+ for id in self.participants.keys() {
+ if self.bid != 0 {
+ msg::send_with_gas(*id, "", 10_000, prize).expect("Error send value");
+ // TODO: uncomment and switch https://github.com/gear-tech/gear/pull/4270
+ // msg::send_with_gas(
+ // *id,
+ // "",
+ // 10_000,
+ // prize,
+ // )
+ // .expect("Error send value");
+ }
+ winners.push(*id);
+ }
+ self.state = State::GameIsOver {
+ winners: (winners[0], Some(winners[1])),
+ };
+ }
+ }
+
+ pub fn check_min_player_amount(&self) -> Result<(), BattleError> {
+ if self.participants.len() <= 1 {
+ return Err(BattleError::NotEnoughPlayers);
+ }
+ Ok(())
+ }
+
+ pub fn split_into_pairs(&mut self) -> Result<(), BattleError> {
+ let round_start_time = exec::block_timestamp();
+ self.create_pairs(round_start_time);
+ Ok(())
+ }
+
+ pub fn create_pairs(&mut self, round_start_time: u64) {
+ self.pairs = HashMap::new();
+ self.players_to_pairs = HashMap::new();
+ let mut participants_vec: Vec<(ActorId, Player)> =
+ self.participants.clone().into_iter().collect();
+
+ while participants_vec.len() > 1 {
+ let range = participants_vec.len() as u8;
+ let idx1 = get_random_value(range);
+ let player1 = participants_vec.swap_remove(idx1 as usize).1;
+ let idx2 = get_random_value(range - 1);
+ let player2 = participants_vec.swap_remove(idx2 as usize).1;
+ let pair = Pair {
+ player_1: player1.owner,
+ player_2: player2.owner,
+ round_start_time,
+ round: 1,
+ action: None,
+ };
+ self.pairs.insert(self.pair_id, pair);
+ self.players_to_pairs.insert(player1.owner, self.pair_id);
+ self.players_to_pairs.insert(player2.owner, self.pair_id);
+ self.pair_id += 1;
+ }
+ // If there are an odd number of participants left, one goes into standby mode
+ if participants_vec.len() == 1 {
+ let player = participants_vec.remove(0).1;
+ let pair = Pair {
+ player_1: player.owner,
+ round: 1,
+ ..Default::default()
+ };
+ self.pairs.insert(self.pair_id, pair);
+ self.players_to_pairs.insert(player.owner, self.pair_id);
+ self.waiting_player = Some((player.owner, self.pair_id));
+ self.pair_id += 1;
+ }
+ }
+ pub fn send_delayed_message_make_move_from_reservation(&mut self, time_for_move: u32) {
+ let mut new_map_reservation = HashMap::new();
+ self.reservation
+ .iter()
+ .for_each(|(actor_id, reservation_id)| {
+ if let Some(waiting_player) = self.waiting_player {
+ if waiting_player.0 == *actor_id {
+ new_map_reservation.insert(waiting_player.0, *reservation_id);
+ return;
+ }
+ }
+ let number_of_victories = self
+ .participants
+ .get(actor_id)
+ .expect("The player must exist")
+ .number_of_victories;
+ let round: u8 = 1;
+ let request = [
+ "Battle".encode(),
+ "AutomaticMove".to_string().encode(),
+ (*actor_id, number_of_victories, round).encode(),
+ ]
+ .concat();
+
+ msg::send_bytes_delayed_from_reservation(
+ *reservation_id,
+ exec::program_id(),
+ request,
+ 0,
+ time_for_move,
+ )
+ .expect("Error in sending message");
+ });
+ self.reservation = new_map_reservation;
+ }
+
+ pub fn check_state(&self, state: State) -> Result<(), BattleError> {
+ if self.state != state {
+ return Err(BattleError::WrongState);
+ }
+ Ok(())
+ }
+}
+
+#[derive(Default, Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub struct Player {
+ pub warrior_id: Option,
+ pub owner: ActorId,
+ pub user_name: String,
+ pub player_settings: PlayerSettings,
+ pub appearance: Appearance,
+ pub number_of_victories: u8,
+ pub ultimate_reload: u8,
+ pub reflect_reload: u8,
+}
+
+#[derive(Debug, PartialEq, Eq, Encode, Decode, TypeInfo, Default, Clone)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub enum State {
+ #[default]
+ Registration,
+ Started,
+ GameIsOver {
+ winners: (ActorId, Option),
+ },
+}
+
+#[derive(Default, Debug, Encode, Decode, TypeInfo, Clone, PartialEq, Eq)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub struct Pair {
+ pub player_1: ActorId,
+ pub player_2: ActorId,
+ pub action: Option<(ActorId, Move)>,
+ pub round: u8,
+ pub round_start_time: u64,
+}
+
+impl Pair {
+ pub fn recap_round(
+ &mut self,
+ player1_info: (&mut Player, Move),
+ player2_info: (&mut Player, Move),
+ ) -> Option {
+ let dodge_1 = get_random_dodge(player1_info.0.player_settings.dodge as u8);
+ let dodge_2 = get_random_dodge(player2_info.0.player_settings.dodge as u8);
+
+ // Damage that players will receive (default 0)
+ let mut damage_1 = 0;
+ let mut damage_2 = 0;
+
+ // Process the actions of both players
+ match (player1_info.1, player2_info.1) {
+ (Move::Attack, Move::Attack) => {
+ if !dodge_2 {
+ damage_2 = player1_info.0.player_settings.attack; // Player 2 takes damage from Player 1
+ }
+ if !dodge_1 {
+ damage_1 = player2_info.0.player_settings.attack; // Player 1 takes damage from Player 2
+ }
+ }
+ (Move::Attack, Move::Reflect) => {
+ if !dodge_2 {
+ // Player 2 reflects the damage, reducing it by the value of his defence
+ damage_2 = player1_info
+ .0
+ .player_settings
+ .attack
+ .saturating_mul(100 - player2_info.0.player_settings.defence)
+ .saturating_div(100);
+ }
+ if !dodge_1 {
+ // Player 1 takes reflected damage
+ damage_1 = player1_info
+ .0
+ .player_settings
+ .attack
+ .saturating_sub(damage_2);
+ }
+ player2_info.0.reflect_reload = 2;
+ }
+ (Move::Reflect, Move::Attack) => {
+ if !dodge_1 {
+ // Player 1 reflects the damage, reducing it by the value of their defence
+ damage_1 = player2_info
+ .0
+ .player_settings
+ .attack
+ .saturating_mul(100 - player1_info.0.player_settings.defence)
+ .saturating_div(100);
+ }
+ if !dodge_2 {
+ // Player 2 takes reflected damage
+ damage_2 = player2_info
+ .0
+ .player_settings
+ .attack
+ .saturating_sub(damage_1);
+ }
+ player1_info.0.reflect_reload = 2;
+ }
+ (Move::Reflect, Move::Reflect) => {
+ // Both players deflect each other's attacks, no damage done
+ damage_1 = 0;
+ damage_2 = 0;
+ player1_info.0.reflect_reload = 2;
+ player2_info.0.reflect_reload = 2;
+ }
+ (Move::Ultimate, Move::Attack) => {
+ if !dodge_1 {
+ // Player 1 receives a normal attack
+ damage_1 = player2_info.0.player_settings.attack;
+ }
+ if !dodge_2 {
+ // Player 2 takes double the damage from Ultimate
+ damage_2 = player1_info.0.player_settings.attack * 2;
+ }
+ player1_info.0.ultimate_reload = 2;
+ }
+ (Move::Attack, Move::Ultimate) => {
+ if !dodge_1 {
+ // Player 1 takes double the damage from Ultimate
+ damage_1 = player2_info.0.player_settings.attack * 2;
+ }
+ if !dodge_2 {
+ // Player 2 receives a normal attack
+ damage_2 = player1_info.0.player_settings.attack;
+ }
+ player2_info.0.ultimate_reload = 2;
+ }
+ (Move::Ultimate, Move::Ultimate) => {
+ if !dodge_1 {
+ // Player 1 takes double the damage from Ultimate
+ damage_1 = player2_info.0.player_settings.attack * 2;
+ }
+ if !dodge_2 {
+ // Player 2 takes double the damage from Ultimate
+ damage_2 = player1_info.0.player_settings.attack * 2;
+ }
+ player1_info.0.ultimate_reload = 2;
+ player2_info.0.ultimate_reload = 2;
+ }
+ (Move::Reflect, Move::Ultimate) => {
+ if !dodge_1 {
+ // Player 1 takes double damage from Ultimate, but can partially deflect it
+ damage_1 = (player2_info.0.player_settings.attack * 2)
+ .saturating_mul(100 - player1_info.0.player_settings.defence)
+ .saturating_div(100);
+ }
+ if !dodge_2 {
+ // Player 2 takes reflected damage
+ damage_2 = (player2_info.0.player_settings.attack * 2).saturating_sub(damage_1);
+ }
+ player1_info.0.reflect_reload = 2;
+ player2_info.0.ultimate_reload = 2;
+ }
+ (Move::Ultimate, Move::Reflect) => {
+ if !dodge_2 {
+ // Player 2 takes double damage from Ultimate, but can partially deflect it
+ damage_2 = (player1_info.0.player_settings.attack * 2)
+ .saturating_mul(100 - player2_info.0.player_settings.defence)
+ .saturating_div(100);
+ }
+ if !dodge_1 {
+ // Player 1 takes reflected damage
+ damage_1 = (player1_info.0.player_settings.attack * 2).saturating_sub(damage_2);
+ }
+ player1_info.0.ultimate_reload = 2;
+ player2_info.0.reflect_reload = 2;
+ }
+ }
+
+ match player2_info.1 {
+ Move::Attack => {
+ player2_info.0.reflect_reload = player2_info.0.reflect_reload.saturating_sub(1);
+ player2_info.0.ultimate_reload = player2_info.0.ultimate_reload.saturating_sub(1);
+ }
+ Move::Reflect => {
+ player2_info.0.ultimate_reload = player2_info.0.ultimate_reload.saturating_sub(1);
+ }
+ Move::Ultimate => {
+ player2_info.0.reflect_reload = player2_info.0.reflect_reload.saturating_sub(1);
+ }
+ }
+
+ match player1_info.1 {
+ Move::Attack => {
+ player1_info.0.reflect_reload = player1_info.0.reflect_reload.saturating_sub(1);
+ player1_info.0.ultimate_reload = player1_info.0.ultimate_reload.saturating_sub(1);
+ }
+ Move::Reflect => {
+ player1_info.0.ultimate_reload = player1_info.0.ultimate_reload.saturating_sub(1);
+ }
+ Move::Ultimate => {
+ player1_info.0.reflect_reload = player1_info.0.reflect_reload.saturating_sub(1);
+ }
+ }
+ // Damage application
+ player1_info.0.player_settings.health = player1_info
+ .0
+ .player_settings
+ .health
+ .saturating_sub(damage_1);
+ player2_info.0.player_settings.health = player2_info
+ .0
+ .player_settings
+ .health
+ .saturating_sub(damage_2);
+
+ // Checking to see who won
+ if player1_info.0.player_settings.health == 0 && player2_info.0.player_settings.health == 0
+ {
+ return Some(BattleResult::Draw(
+ player1_info.0.owner,
+ player2_info.0.owner,
+ )); // Both players lost, a draw
+ } else if player1_info.0.player_settings.health == 0 {
+ return Some(BattleResult::PlayerWin(player2_info.0.owner)); // Player 2 wins
+ } else if player2_info.0.player_settings.health == 0 {
+ return Some(BattleResult::PlayerWin(player1_info.0.owner)); // Player 1 wins
+ }
+ None // Both players are still alive, no one has won
+ }
+
+ pub fn get_opponent(&self, player: &ActorId) -> ActorId {
+ if self.player_1 != *player {
+ self.player_1
+ } else {
+ self.player_2
+ }
+ }
+}
+
+#[derive(Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone, Copy)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub enum Move {
+ Attack,
+ Reflect,
+ Ultimate,
+}
+
+#[derive(Default, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub struct PlayerSettings {
+ pub health: u16,
+ pub attack: u16,
+ pub defence: u16,
+ pub dodge: u16,
+}
+
+#[derive(Default, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub struct Config {
+ pub health: u16,
+ pub max_participants: u8,
+ pub attack_range: (u16, u16),
+ pub defence_range: (u16, u16),
+ pub dodge_range: (u16, u16),
+ pub available_points: u16,
+ pub time_for_move_in_blocks: u32,
+ pub block_duration_ms: u32,
+ pub gas_for_create_warrior: u64,
+ pub gas_to_cancel_the_battle: u64,
+ pub time_to_cancel_the_battle: u32,
+ pub reservation_amount: u64,
+ pub reservation_time: u32,
+}
+
+#[derive(Debug, Default, Clone, TypeInfo, Encode, Decode)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub struct BattleState {
+ pub admin: ActorId,
+ pub battle_name: String,
+ pub time_creation: u64,
+ pub bid: u128,
+ pub participants: Vec<(ActorId, Player)>,
+ pub defeated_participants: Vec<(ActorId, Player)>,
+ pub state: State,
+ pub pairs: Vec<(PairId, Pair)>,
+ pub players_to_pairs: Vec<(ActorId, PairId)>,
+ pub waiting_player: Option<(ActorId, PairId)>,
+ pub pair_id: u16,
+ pub reservation: Vec<(ActorId, ReservationId)>,
+}
+
+impl From for BattleState {
+ fn from(value: Battle) -> Self {
+ let Battle {
+ admin,
+ battle_name,
+ time_creation,
+ bid,
+ participants,
+ defeated_participants,
+ state,
+ pairs,
+ players_to_pairs,
+ waiting_player,
+ pair_id,
+ reservation,
+ } = value;
+
+ let participants = participants.into_iter().collect();
+ let defeated_participants = defeated_participants.into_iter().collect();
+ let pairs = pairs.into_iter().collect();
+ let players_to_pairs = players_to_pairs.into_iter().collect();
+ let reservation = reservation.into_iter().collect();
+
+ Self {
+ admin,
+ battle_name,
+ time_creation,
+ bid,
+ participants,
+ defeated_participants,
+ state,
+ pairs,
+ players_to_pairs,
+ reservation,
+ pair_id,
+ waiting_player,
+ }
+ }
+}
+
+pub enum BattleResult {
+ PlayerWin(ActorId),
+ Draw(ActorId, ActorId),
+}
+
+#[derive(Default, Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub struct Appearance {
+ head_index: u16,
+ hat_index: u16,
+ body_index: u16,
+ accessory_index: u16,
+ body_color: String,
+ back_color: String,
+}
diff --git a/contracts/battle/app/src/services/mod.rs b/contracts/battle/app/src/services/mod.rs
new file mode 100644
index 000000000..c7f00d70e
--- /dev/null
+++ b/contracts/battle/app/src/services/mod.rs
@@ -0,0 +1,2 @@
+pub mod game;
+pub mod utils;
diff --git a/contracts/battle/app/src/services/utils.rs b/contracts/battle/app/src/services/utils.rs
new file mode 100644
index 000000000..9dee576e1
--- /dev/null
+++ b/contracts/battle/app/src/services/utils.rs
@@ -0,0 +1,13 @@
+use core::fmt::Debug;
+use gstd::{ext, format};
+
+pub fn panicking Result>(f: F) -> T {
+ match f() {
+ Ok(v) => v,
+ Err(e) => panic(e),
+ }
+}
+
+pub fn panic(err: impl Debug) -> ! {
+ ext::panic(&format!("{err:?}"))
+}
diff --git a/contracts/battle/build.rs b/contracts/battle/build.rs
new file mode 100644
index 000000000..050e2acf5
--- /dev/null
+++ b/contracts/battle/build.rs
@@ -0,0 +1,23 @@
+use std::{
+ env,
+ fs::File,
+ io::{BufRead, BufReader},
+ path::PathBuf,
+};
+
+fn main() {
+ sails_rs::build_wasm();
+
+ if env::var("__GEAR_WASM_BUILDER_NO_BUILD").is_ok() {
+ return;
+ }
+
+ let bin_path_file = File::open(".binpath").unwrap();
+ let mut bin_path_reader = BufReader::new(bin_path_file);
+ let mut bin_path = String::new();
+ bin_path_reader.read_line(&mut bin_path).unwrap();
+
+ let mut idl_path = PathBuf::from(bin_path);
+ idl_path.set_extension("idl");
+ sails_idl_gen::generate_idl_to_file::(idl_path).unwrap();
+}
diff --git a/contracts/battle/client/Cargo.toml b/contracts/battle/client/Cargo.toml
new file mode 100644
index 000000000..26df018fc
--- /dev/null
+++ b/contracts/battle/client/Cargo.toml
@@ -0,0 +1,17 @@
+[package]
+name = "battle-client"
+version.workspace = true
+edition.workspace = true
+publish.workspace = true
+
+[dependencies]
+mockall = { version = "0.12", optional = true }
+sails-rs.workspace = true
+
+[build-dependencies]
+battle-app = { path = "../app" }
+sails-client-gen.workspace = true
+sails-idl-gen.workspace = true
+
+[features]
+mocks = ["sails-rs/mockall", "dep:mockall"]
diff --git a/contracts/battle/client/build.rs b/contracts/battle/client/build.rs
new file mode 100644
index 000000000..433266a93
--- /dev/null
+++ b/contracts/battle/client/build.rs
@@ -0,0 +1,16 @@
+use sails_client_gen::ClientGenerator;
+use std::{env, path::PathBuf};
+
+fn main() {
+ let out_dir_path = PathBuf::from(env::var("OUT_DIR").unwrap());
+ let idl_file_path = out_dir_path.join("battle.idl");
+
+ // Generate IDL file for the program
+ sails_idl_gen::generate_idl_to_file::(&idl_file_path).unwrap();
+
+ // Generate client code from IDL file
+ ClientGenerator::from_idl_path(&idl_file_path)
+ .with_mocks("mocks")
+ .generate_to(PathBuf::from(env::var("OUT_DIR").unwrap()).join("battle_client.rs"))
+ .unwrap();
+}
diff --git a/contracts/battle/client/src/lib.rs b/contracts/battle/client/src/lib.rs
new file mode 100644
index 000000000..47decc3c7
--- /dev/null
+++ b/contracts/battle/client/src/lib.rs
@@ -0,0 +1,4 @@
+#![no_std]
+#![allow(clippy::too_many_arguments)]
+// Incorporate code generated based on the IDL file
+include!(concat!(env!("OUT_DIR"), "/battle_client.rs"));
diff --git a/contracts/battle/src/lib.rs b/contracts/battle/src/lib.rs
new file mode 100644
index 000000000..f7dc0bbd0
--- /dev/null
+++ b/contracts/battle/src/lib.rs
@@ -0,0 +1,14 @@
+#![no_std]
+
+#[cfg(target_arch = "wasm32")]
+pub use battle_app::wasm::*;
+
+#[cfg(feature = "wasm-binary")]
+#[cfg(not(target_arch = "wasm32"))]
+pub use code::WASM_BINARY_OPT as WASM_BINARY;
+
+#[cfg(feature = "wasm-binary")]
+#[cfg(not(target_arch = "wasm32"))]
+mod code {
+ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
+}
diff --git a/contracts/battle/tests/gtest.rs b/contracts/battle/tests/gtest.rs
new file mode 100644
index 000000000..777d160b5
--- /dev/null
+++ b/contracts/battle/tests/gtest.rs
@@ -0,0 +1,456 @@
+use battle_client::{traits::*, Appearance, Config, Move};
+use gstd::errors::{ErrorReplyReason, SimpleExecutionError};
+use gtest::{Program, System};
+use sails_rs::errors::{Error, RtlError};
+use sails_rs::{calls::*, gtest::calls::*, ActorId, Encode};
+
+const USER_1: u64 = 100;
+const USER_2: u64 = 101;
+const USER_3: u64 = 102;
+
+fn init_warrior(system: &System, user: u64) -> ActorId {
+ let warrior = Program::from_file(
+ system,
+ "../target/wasm32-unknown-unknown/release/warrior_wasm.opt.wasm",
+ );
+ let request = ["New".encode(), ("link".to_string()).encode()].concat();
+
+ let mid = warrior.send_bytes(user, request);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+ warrior.id()
+}
+
+#[tokio::test]
+async fn test() {
+ let system = System::new();
+ system.init_logger();
+ system.mint_to(USER_1, 100_000_000_000_000);
+ system.mint_to(USER_2, 100_000_000_000_000);
+ system.mint_to(USER_3, 100_000_000_000_000);
+
+ let remoting = GTestRemoting::new(system, USER_1.into());
+
+ // Submit program code into the system
+ let program_code_id = remoting.system().submit_code(battle::WASM_BINARY);
+
+ let program_factory = battle_client::BattleFactory::new(remoting.clone());
+
+ let program_id = program_factory
+ .new(Config {
+ health: 100,
+ max_participants: 10,
+ attack_range: (10, 20),
+ defence_range: (0, 10),
+ dodge_range: (0, 10),
+ available_points: 20,
+ time_for_move_in_blocks: 20,
+ block_duration_ms: 3_000,
+ gas_for_create_warrior: 10_000_000_000,
+ gas_to_cancel_the_battle: 10_000_000_000,
+ reservation_amount: 500_000_000_000,
+ reservation_time: 1_000,
+ time_to_cancel_the_battle: 10_000,
+ })
+ .send_recv(program_code_id, b"salt")
+ .await
+ .unwrap();
+
+ let mut service_client = battle_client::Battle::new(remoting.clone());
+ let warrior_id = init_warrior(remoting.system(), USER_1);
+
+ service_client
+ .create_new_battle(
+ "Battle".to_string(),
+ "Warrior_1".to_string(),
+ Some(warrior_id),
+ None,
+ 15,
+ 10,
+ 5,
+ )
+ .with_value(10_000_000_000)
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ let warrior_id = init_warrior(remoting.system(), USER_2);
+ println!("warrior_id {:?}", warrior_id);
+ service_client
+ .register(
+ remoting.actor_id(),
+ None,
+ Some(Appearance {
+ head_index: 1,
+ hat_index: 2,
+ body_index: 3,
+ accessory_index: 4,
+ body_color: "#008000".to_string(),
+ back_color: "#0000FF".to_string(),
+ }),
+ "Warrior_2".to_string(),
+ 15,
+ 10,
+ 5,
+ )
+ .with_value(10_000_000_000)
+ .with_args(GTestArgs::new(USER_2.into()))
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ let warrior_id = init_warrior(remoting.system(), USER_3);
+ println!("warrior_id {:?}", warrior_id);
+ service_client
+ .register(
+ remoting.actor_id(),
+ None,
+ Some(Appearance {
+ head_index: 1,
+ hat_index: 2,
+ body_index: 3,
+ accessory_index: 4,
+ body_color: "#008000".to_string(),
+ back_color: "#0000FF".to_string(),
+ }),
+ "Warrior_3".to_string(),
+ 15,
+ 10,
+ 5,
+ )
+ .with_value(10_000_000_000)
+ .with_args(GTestArgs::new(USER_3.into()))
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ service_client
+ .start_battle()
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ make_move(&mut service_client, Move::Attack, USER_2, program_id)
+ .await
+ .unwrap();
+
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n block {:?}", remoting.system().block_height());
+ println!("\n RES {:?}", result);
+
+ remoting
+ .system()
+ .run_to_block(remoting.system().block_height() + 20);
+
+ println!("\n block {:?}", remoting.system().block_height());
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ remoting
+ .system()
+ .run_to_block(remoting.system().block_height() + 150);
+ println!("\n block {:?}", remoting.system().block_height());
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ service_client
+ .start_next_fight()
+ .with_args(GTestArgs::new(USER_3.into()))
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ remoting
+ .system()
+ .run_to_block(remoting.system().block_height() + 100);
+ println!("\n block {:?}", remoting.system().block_height());
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+}
+
+#[tokio::test]
+async fn second_test() {
+ let system = System::new();
+ system.init_logger();
+ system.mint_to(USER_1, 100_000_000_000_000);
+ system.mint_to(USER_2, 100_000_000_000_000);
+ system.mint_to(USER_3, 100_000_000_000_000);
+
+ let remoting = GTestRemoting::new(system, USER_1.into());
+
+ // Submit program code into the system
+ let program_code_id = remoting.system().submit_code(battle::WASM_BINARY);
+
+ let program_factory = battle_client::BattleFactory::new(remoting.clone());
+
+ let program_id = program_factory
+ .new(Config {
+ health: 100,
+ max_participants: 10,
+ attack_range: (10, 20),
+ defence_range: (0, 10),
+ dodge_range: (0, 10),
+ available_points: 20,
+ time_for_move_in_blocks: 20,
+ block_duration_ms: 3_000,
+ gas_for_create_warrior: 10_000_000_000,
+ gas_to_cancel_the_battle: 10_000_000_000,
+ reservation_amount: 500_000_000_000,
+ reservation_time: 1_000,
+ time_to_cancel_the_battle: 10_000,
+ })
+ .send_recv(program_code_id, b"salt")
+ .await
+ .unwrap();
+
+ let mut service_client = battle_client::Battle::new(remoting.clone());
+
+ let warrior_id = init_warrior(remoting.system(), USER_1);
+ service_client
+ .create_new_battle(
+ "Battle".to_string(),
+ "Warrior_1".to_string(),
+ Some(warrior_id),
+ None,
+ 20,
+ 5,
+ 5,
+ )
+ .with_value(10_000_000_000)
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ service_client
+ .register(
+ remoting.actor_id(),
+ None,
+ Some(Appearance {
+ head_index: 1,
+ hat_index: 2,
+ body_index: 3,
+ accessory_index: 4,
+ body_color: "#008000".to_string(),
+ back_color: "#0000FF".to_string(),
+ }),
+ "Warrior_2".to_string(),
+ 15,
+ 8,
+ 7,
+ )
+ .with_value(10_000_000_000)
+ .with_args(GTestArgs::new(USER_2.into()))
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ println!(
+ "\n start_battle block {:?}",
+ remoting.system().block_height()
+ );
+ service_client
+ .start_battle()
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ remoting
+ .system()
+ .run_to_block(remoting.system().block_height() + 5);
+
+ println!("\n make_move block {:?}", remoting.system().block_height());
+
+ make_move(&mut service_client, Move::Ultimate, USER_1, program_id)
+ .await
+ .unwrap();
+ make_move(&mut service_client, Move::Reflect, USER_2, program_id)
+ .await
+ .unwrap();
+
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ remoting
+ .system()
+ .run_to_block(remoting.system().block_height() + 20);
+
+ println!("\n block {:?}", remoting.system().block_height());
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ remoting
+ .system()
+ .run_to_block(remoting.system().block_height() + 100);
+ println!("\n block {:?}", remoting.system().block_height());
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+
+ println!("\n RES {:?}", result);
+
+ remoting
+ .system()
+ .run_to_block(remoting.system().block_height() + 20);
+ println!("\n block {:?}", remoting.system().block_height());
+ let result = get_battle(&service_client, remoting.actor_id(), program_id).await;
+ println!("\n RES {:?}", result);
+}
+
+#[tokio::test]
+async fn test_error() {
+ let system = System::new();
+ system.init_logger();
+ system.mint_to(USER_1, 100_000_000_000_000);
+ system.mint_to(USER_2, 100_000_000_000_000);
+ system.mint_to(USER_3, 100_000_000_000_000);
+
+ let remoting = GTestRemoting::new(system, USER_1.into());
+
+ // Submit program code into the system
+ let program_code_id = remoting.system().submit_code(battle::WASM_BINARY);
+
+ let program_factory = battle_client::BattleFactory::new(remoting.clone());
+
+ let program_id = program_factory
+ .new(Config {
+ health: 100,
+ max_participants: 10,
+ attack_range: (10, 20),
+ defence_range: (0, 10),
+ dodge_range: (0, 10),
+ available_points: 20,
+ time_for_move_in_blocks: 20,
+ block_duration_ms: 3_000,
+ gas_for_create_warrior: 10_000_000_000,
+ gas_to_cancel_the_battle: 10_000_000_000,
+ reservation_amount: 500_000_000_000,
+ reservation_time: 1_000,
+ time_to_cancel_the_battle: 10_000,
+ })
+ .send_recv(program_code_id, b"salt")
+ .await
+ .unwrap();
+
+ let mut service_client = battle_client::Battle::new(remoting.clone());
+
+ let warrior_id = init_warrior(remoting.system(), USER_1);
+ service_client
+ .create_new_battle(
+ "Battle".to_string(),
+ "Warrior_1".to_string(),
+ Some(warrior_id),
+ None,
+ 15,
+ 10,
+ 5,
+ )
+ .with_value(10_000_000_000)
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ service_client
+ .register(
+ remoting.actor_id(),
+ None,
+ Some(Appearance {
+ head_index: 1,
+ hat_index: 2,
+ body_index: 3,
+ accessory_index: 4,
+ body_color: "#008000".to_string(),
+ back_color: "#0000FF".to_string(),
+ }),
+ "Warrior_2".to_string(),
+ 15,
+ 10,
+ 5,
+ )
+ .with_value(10_000_000_000)
+ .with_args(GTestArgs::new(USER_2.into()))
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ println!(
+ "\n start_battle block {:?}",
+ remoting.system().block_height()
+ );
+ service_client
+ .start_battle()
+ .send_recv(program_id)
+ .await
+ .unwrap();
+
+ make_move(&mut service_client, Move::Ultimate, USER_1, program_id)
+ .await
+ .unwrap();
+ make_move(&mut service_client, Move::Reflect, USER_2, program_id)
+ .await
+ .unwrap();
+
+ let res = make_move(&mut service_client, Move::Ultimate, USER_1, program_id).await;
+ check_result(res, "Panic occurred: UltimateReload".to_string());
+
+ let res = make_move(&mut service_client, Move::Reflect, USER_2, program_id).await;
+ check_result(res, "Panic occurred: ReflectReload".to_string());
+}
+
+async fn make_move(
+ service_client: &mut battle_client::Battle,
+ turn: battle_client::Move,
+ user: u64,
+ program_id: ActorId,
+) -> Result<(), Error> {
+ service_client
+ .make_move(turn)
+ .with_args(GTestArgs::new(user.into()))
+ .send_recv(program_id)
+ .await
+}
+
+async fn get_battle(
+ service_client: &battle_client::Battle,
+ game_id: ActorId,
+ program_id: ActorId,
+) -> Option {
+ service_client
+ .get_battle(game_id)
+ .recv(program_id)
+ .await
+ .unwrap()
+}
+
+fn check_result(result: Result<(), Error>, error_string: String) {
+ assert!(matches!(
+ result,
+ Err(sails_rs::errors::Error::Rtl(RtlError::ReplyHasError(
+ ErrorReplyReason::Execution(SimpleExecutionError::UserspacePanic),
+ message
+ ))) if message == error_string
+ ));
+}
diff --git a/contracts/battle/warrior/README.md b/contracts/battle/warrior/README.md
new file mode 100644
index 000000000..52b03f773
--- /dev/null
+++ b/contracts/battle/warrior/README.md
@@ -0,0 +1,7 @@
+## The **warrior** program
+
+### 🏗️ Building
+
+```sh
+cargo b -r -p "warrior*"
+```
diff --git a/contracts/battle/warrior/app/Cargo.toml b/contracts/battle/warrior/app/Cargo.toml
new file mode 100644
index 000000000..e69ec9629
--- /dev/null
+++ b/contracts/battle/warrior/app/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "warrior-app"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+sails-rs.workspace = true
diff --git a/contracts/battle/warrior/app/src/lib.rs b/contracts/battle/warrior/app/src/lib.rs
new file mode 100644
index 000000000..20b9aa825
--- /dev/null
+++ b/contracts/battle/warrior/app/src/lib.rs
@@ -0,0 +1,86 @@
+#![no_std]
+#![allow(clippy::new_without_default)]
+use sails_rs::gstd::msg;
+use sails_rs::prelude::*;
+
+#[derive(Debug)]
+struct WarriorStorage {
+ owner: ActorId,
+ appearance: Appearance,
+}
+
+#[derive(Debug, TypeInfo, Encode)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+struct Appearance {
+ head_index: u16,
+ hat_index: u16,
+ body_index: u16,
+ accessory_index: u16,
+ body_color: String,
+ back_color: String,
+}
+
+static mut STORAGE: Option = None;
+
+struct WarriorService(());
+
+impl WarriorService {
+ pub fn init() -> Self {
+ unsafe {
+ STORAGE = Some(WarriorStorage {
+ owner: msg::source(),
+ // YOUR CODE HERE: fill in the remaining fields
+ // appearance: Appearance {
+ // head_index: ..,
+ // hat_index: ..,
+ // body_index: ..,
+ // accessory_index: ..,
+ // body_color: ..,
+ // back_color: ..,
+ // }
+ //
+ // For example:
+ appearance: Appearance {
+ head_index: 1,
+ hat_index: 2,
+ body_index: 3,
+ accessory_index: 4,
+ body_color: "#008000".to_string(),
+ back_color: "#0000FF".to_string(),
+ },
+ });
+ }
+ Self(())
+ }
+ pub fn get_warrior_storage(&self) -> &'static WarriorStorage {
+ unsafe { STORAGE.as_ref().expect("Storage is not initialized") }
+ }
+}
+
+#[sails_rs::service]
+impl WarriorService {
+ pub fn new() -> Self {
+ Self(())
+ }
+ pub fn get_owner(&self) -> ActorId {
+ self.get_warrior_storage().owner
+ }
+ pub fn get_appearance(&self) -> &'static Appearance {
+ &self.get_warrior_storage().appearance
+ }
+}
+
+pub struct WarriorProgram(());
+
+#[sails_rs::program]
+impl WarriorProgram {
+ pub fn new() -> Self {
+ WarriorService::init();
+ Self(())
+ }
+
+ pub fn warrior(&self) -> WarriorService {
+ WarriorService::new()
+ }
+}
diff --git a/contracts/battle/warrior/wasm/Cargo.toml b/contracts/battle/warrior/wasm/Cargo.toml
new file mode 100644
index 000000000..52e45680a
--- /dev/null
+++ b/contracts/battle/warrior/wasm/Cargo.toml
@@ -0,0 +1,18 @@
+[package]
+name = "warrior-wasm"
+version.workspace = true
+edition.workspace = true
+license.workspace = true
+
+[dependencies]
+warrior-app = { path = "../app" }
+sails-rs.workspace = true
+
+[build-dependencies]
+gear-wasm-builder.workspace = true
+sails-idl-gen.workspace = true
+warrior-app = { path = "../app" }
+
+[lib]
+crate-type = ["rlib"]
+name = "warrior_wasm"
diff --git a/contracts/battle/warrior/wasm/build.rs b/contracts/battle/warrior/wasm/build.rs
new file mode 100644
index 000000000..8f09df7f0
--- /dev/null
+++ b/contracts/battle/warrior/wasm/build.rs
@@ -0,0 +1,15 @@
+use sails_idl_gen::program;
+use std::{env, fs::File, path::PathBuf};
+use warrior_app::WarriorProgram;
+
+fn main() {
+ gear_wasm_builder::build();
+
+ let manifest_dir_path = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
+
+ let idl_file_path = manifest_dir_path.join("warrior.idl");
+
+ let idl_file = File::create(idl_file_path.clone()).unwrap();
+
+ program::generate_idl::(idl_file).unwrap();
+}
diff --git a/contracts/battle/warrior/wasm/src/lib.rs b/contracts/battle/warrior/wasm/src/lib.rs
new file mode 100644
index 000000000..318208bf0
--- /dev/null
+++ b/contracts/battle/warrior/wasm/src/lib.rs
@@ -0,0 +1,5 @@
+#![no_std]
+include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
+
+#[cfg(target_arch = "wasm32")]
+pub use warrior_app::wasm::*;
diff --git a/contracts/battle/warrior/wasm/warrior.idl b/contracts/battle/warrior/wasm/warrior.idl
new file mode 100644
index 000000000..ce8651b09
--- /dev/null
+++ b/contracts/battle/warrior/wasm/warrior.idl
@@ -0,0 +1,18 @@
+type Appearance = struct {
+ head_index: u16,
+ hat_index: u16,
+ body_index: u16,
+ accessory_index: u16,
+ body_color: str,
+ back_color: str,
+};
+
+constructor {
+ New : ();
+};
+
+service Warrior {
+ query GetAppearance : () -> Appearance;
+ query GetOwner : () -> actor_id;
+};
+
diff --git a/contracts/battleship/README.md b/contracts/battleship/README.md
index e1f180c96..2ffee9ca5 100644
--- a/contracts/battleship/README.md
+++ b/contracts/battleship/README.md
@@ -1,24 +1,23 @@
[![Open in Gitpod](https://img.shields.io/badge/Open_in-Gitpod-white?logo=gitpod)](https://gitpod.io/#FOLDER=battleship/https://github.com/gear-foundation/dapps)
[![Docs](https://img.shields.io/github/actions/workflow/status/gear-foundation/dapps/contracts.yml?logo=rust&label=docs)](https://dapps.gear.rs/battleship_io)
-# [Battleship](https://wiki.gear-tech.io/docs/examples/Gaming/battleship)
+# [Battleship](https://wiki.vara.network/docs/examples/Gaming/Battleship)
### 🏗️ Building
```sh
-cargo b -p "battleship*"
+cargo b -r -p "battleship*"
```
### ✅ Testing
Run all tests, except `gclient` ones:
```sh
-cargo t -p "battleship*" -- --skip gclient
+cargo t -r -p "battleship*" -- --skip gclient
```
Run all tests:
```sh
# Download the node binary.
-cargo xtask node
-cargo t -p "battleship*"
+cargo t -r -p "battleship*"
```
diff --git a/contracts/battleship/io/src/lib.rs b/contracts/battleship/io/src/lib.rs
index 62dc8dfd0..c9b4edb06 100644
--- a/contracts/battleship/io/src/lib.rs
+++ b/contracts/battleship/io/src/lib.rs
@@ -8,7 +8,7 @@ use gstd::{
};
// Minimum duration of session: 3 mins = 180_000 ms = 60 blocks
-pub const MINIMUM_SESSION_SURATION_MS: u64 = 180_000;
+pub const MINIMUM_SESSION_DURATION_MS: u64 = 180_000;
pub struct BattleshipMetadata;
diff --git a/contracts/battleship/src/contract.rs b/contracts/battleship/src/contract.rs
index 672fca5f2..3c5888f79 100644
--- a/contracts/battleship/src/contract.rs
+++ b/contracts/battleship/src/contract.rs
@@ -26,7 +26,7 @@ impl Battleship {
duration: u64,
allowed_actions: Vec,
) -> Result {
- if duration < MINIMUM_SESSION_SURATION_MS {
+ if duration < MINIMUM_SESSION_DURATION_MS {
return Err(BattleshipError::DurationIsSmall);
}
@@ -44,7 +44,6 @@ impl Battleship {
}
let expires = block_timestamp + duration;
-
let number_of_blocks = u32::try_from(duration.div_ceil(self.config.block_duration_ms))
.expect("Duration is too large");
diff --git a/contracts/battleship/tests/test.rs b/contracts/battleship/tests/test.rs
index 7ce3ca3e3..a116a5bab 100644
--- a/contracts/battleship/tests/test.rs
+++ b/contracts/battleship/tests/test.rs
@@ -1,12 +1,13 @@
use battleship_io::{
ActionsForSession, BattleshipAction, BattleshipError, BattleshipInit, BattleshipParticipants,
BattleshipReply, Config, Entity, GameState, Session, Ships, StateQuery, StateReply,
- MINIMUM_SESSION_SURATION_MS,
+ MINIMUM_SESSION_DURATION_MS,
};
use gstd::prelude::*;
use gtest::{Program, System};
-const BLOCK_DURATION_MS: u64 = 1_000;
+const BLOCK_DURATION_MS: u64 = 3_000;
+const USER_ID: [u64; 2] = [3, 4];
fn init_battleship(sys: &System) {
let battleship = Program::current(sys);
@@ -14,11 +15,12 @@ fn init_battleship(sys: &System) {
sys,
"../target/wasm32-unknown-unknown/release/battleship_bot.opt.wasm",
);
- let bot_init_result = bot.send_bytes(3, []);
- assert!(!bot_init_result.main_failed());
+ let mid = bot.send_bytes(3, []);
+ let res = sys.run_next_block();
+ assert!(res.succeed.contains(&mid));
- let res = battleship.send(
- 3,
+ let mid = battleship.send(
+ USER_ID[0],
BattleshipInit {
bot_address: 2.into(),
config: Config {
@@ -29,13 +31,15 @@ fn init_battleship(sys: &System) {
},
},
);
- assert!(!res.main_failed());
+ let res = sys.run_next_block();
+ assert!(res.succeed.contains(&mid));
}
#[test]
fn failures_location_ships() {
let system = System::new();
system.init_logger();
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
// outfield
@@ -45,16 +49,16 @@ fn failures_location_ships() {
ship_3: vec![4, 9],
ship_4: vec![16, 21],
};
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::StartGame {
ships,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::OutOfBounds).encode()
)));
// wrong ship size
@@ -64,16 +68,16 @@ fn failures_location_ships() {
ship_3: vec![4, 9],
ship_4: vec![16, 21],
};
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::StartGame {
ships,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::WrongLength).encode()
)));
// ship crossing
@@ -83,16 +87,16 @@ fn failures_location_ships() {
ship_3: vec![4, 9],
ship_4: vec![16, 21],
};
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::StartGame {
ships,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::IncorrectLocationShips).encode()
)));
// the ship isn't solid
@@ -102,16 +106,16 @@ fn failures_location_ships() {
ship_3: vec![4, 9],
ship_4: vec![16, 21],
};
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::StartGame {
ships,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::IncorrectLocationShips).encode()
)));
// the distance between the ships is not maintained
@@ -121,16 +125,16 @@ fn failures_location_ships() {
ship_3: vec![4, 9],
ship_4: vec![16, 21],
};
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::StartGame {
ships,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::IncorrectLocationShips).encode()
)));
}
@@ -139,20 +143,23 @@ fn failures_location_ships() {
fn failures_test() {
let system = System::new();
system.init_logger();
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
+ system.mint_to(USER_ID[1], 100_000_000_000_000);
+
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
// the game hasn't started
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::Turn {
step: 10,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::GameIsNotStarted).encode()
)));
@@ -162,14 +169,14 @@ fn failures_test() {
ship_3: vec![4, 9],
ship_4: vec![16, 21],
};
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::StartGame {
ships,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ system.run_next_block();
// you cannot start a new game until the previous one is finished
let ships = Ships {
ship_1: vec![19],
@@ -177,37 +184,37 @@ fn failures_test() {
ship_3: vec![4, 9],
ship_4: vec![16, 21],
};
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::StartGame {
ships,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::GameIsAlreadyStarted).encode()
)));
// outfield
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::Turn {
step: 25,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::OutOfBounds).encode()
)));
// only the admin can change the bot's contract address
- let res = battleship.send(4, BattleshipAction::ChangeBot { bot: 8.into() });
- assert!(!res.main_failed());
+ battleship.send(USER_ID[1], BattleshipAction::ChangeBot { bot: 8.into() });
+ let res = system.run_next_block();
assert!(res.contains(&(
- 4,
+ USER_ID[1],
Err::(BattleshipError::NotAdmin).encode()
)));
@@ -221,26 +228,27 @@ fn failures_test() {
|| state.games[0].1.bot_board[step as usize] == Entity::Ship
{
if !state.games[0].1.game_over {
- let res = battleship.send(
- 3,
+ let mid = battleship.send(
+ USER_ID[0],
BattleshipAction::Turn {
step,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
} else {
// game is over
- let res = battleship.send(
- 3,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::Turn {
step: 25,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- 3,
+ USER_ID[0],
Err::(BattleshipError::GameIsAlreadyOver)
.encode()
)));
@@ -254,6 +262,7 @@ fn failures_test() {
fn success_test() {
let system = System::new();
system.init_logger();
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
let ships = Ships {
@@ -262,14 +271,15 @@ fn success_test() {
ship_3: vec![4, 9],
ship_4: vec![16, 21],
};
- let res = battleship.send(
- 3,
+ let mid = battleship.send(
+ USER_ID[0],
BattleshipAction::StartGame {
ships,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
let steps: Vec = (0..25).collect();
for step in steps {
@@ -281,19 +291,21 @@ fn success_test() {
|| state.games[0].1.bot_board[step as usize] == Entity::Ship
|| state.games[0].1.game_over)
{
- let res = battleship.send(
- 3,
+ let mid = battleship.send(
+ USER_ID[0],
BattleshipAction::Turn {
step,
session_for_account: None,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
}
}
}
- let res = battleship.send(3, BattleshipAction::ChangeBot { bot: 5.into() });
- assert!(!res.main_failed());
+ let mid = battleship.send(USER_ID[0], BattleshipAction::ChangeBot { bot: 5.into() });
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
}
// successful session creation
@@ -301,33 +313,31 @@ fn success_test() {
fn create_session_success() {
let system = System::new();
system.init_logger();
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
- let main_account = 3;
- let proxy_account = 10;
-
- let duration = MINIMUM_SESSION_SURATION_MS;
- let session = Session {
- key: proxy_account.into(),
+ let duration = 180_000;
+ let mut session = Session {
+ key: USER_ID[1].into(),
expires: system.block_timestamp() + duration,
allowed_actions: vec![ActionsForSession::StartGame, ActionsForSession::Turn],
};
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions: session.allowed_actions.clone(),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionCreated).encode()
)));
-
- check_session_in_state(&battleship, main_account, Some(session));
+ session.expires += 3000;
+ check_session_in_state(&battleship, USER_ID[0], Some(session));
}
// Failed session creation attempts:
@@ -339,6 +349,7 @@ fn create_session_success() {
fn create_session_failures() {
let system = System::new();
system.init_logger();
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
@@ -347,55 +358,53 @@ fn create_session_failures() {
// Block duration: 3 sec = 3000 ms
let duration = number_of_blocks * BLOCK_DURATION_MS;
let allowed_actions = vec![ActionsForSession::StartGame, ActionsForSession::Turn];
- let main_account = 3;
- let proxy_account = 10;
- let res = battleship.send(
- main_account,
+ let mid = battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions,
},
);
- assert!(res.main_failed());
-
+ let res = system.run_next_block();
+ res.failed.contains(&mid);
// The session duration is less than minimum session duration
- let duration = MINIMUM_SESSION_SURATION_MS - 1;
+ let duration = MINIMUM_SESSION_DURATION_MS - 1;
let allowed_actions = vec![ActionsForSession::StartGame, ActionsForSession::Turn];
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Err::(BattleshipError::DurationIsSmall).encode()
)));
// there are no allowed actions (empty array of allowed_actions).
- let duration = MINIMUM_SESSION_SURATION_MS;
+ let duration = 180_000;
let allowed_actions = vec![];
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Err::(BattleshipError::NoMessagesForApprovalWerePassed)
.encode()
)));
@@ -403,31 +412,31 @@ fn create_session_failures() {
// The user already has a current active session.
let allowed_actions = vec![ActionsForSession::StartGame, ActionsForSession::Turn];
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions: allowed_actions.clone(),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionCreated).encode()
)));
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions,
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Err::(BattleshipError::AlreadyHaveActiveSession).encode()
)));
}
@@ -437,40 +446,35 @@ fn create_session_failures() {
// This message is responsible for removing the session after its duration has expired.
// successful session creation
#[test]
-#[ignore]
fn session_deletion_on_expiration() {
let system = System::new();
system.init_logger();
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
- let main_account = 3;
- let proxy_account = 10;
-
- let duration = MINIMUM_SESSION_SURATION_MS + 1;
+ let duration = MINIMUM_SESSION_DURATION_MS;
let number_of_blocks = duration / BLOCK_DURATION_MS;
let session = Session {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
expires: system.block_timestamp() + duration,
allowed_actions: vec![ActionsForSession::StartGame, ActionsForSession::Turn],
};
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions: session.allowed_actions.clone(),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionCreated).encode()
)));
-
- system.spend_blocks((number_of_blocks as u32) + 1);
-
- check_session_in_state(&battleship, main_account, None);
+ system.run_to_block(system.block_height() + (number_of_blocks as u32) + 1);
+ check_session_in_state(&battleship, USER_ID[0], None);
}
// This test verifies that the contract does not allow the game to start
@@ -480,35 +484,34 @@ fn session_deletion_on_expiration() {
fn disallow_game_without_required_actions() {
let system = System::new();
system.init_logger();
-
- let main_account = 3;
- let proxy_account = 10;
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
+ system.mint_to(USER_ID[1], 100_000_000_000_000);
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
- let duration = MINIMUM_SESSION_SURATION_MS;
- let session = Session {
- key: proxy_account.into(),
+ let duration = MINIMUM_SESSION_DURATION_MS;
+ let mut session = Session {
+ key: USER_ID[1].into(),
expires: system.block_timestamp() + duration,
allowed_actions: vec![ActionsForSession::Turn],
};
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions: session.allowed_actions.clone(),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionCreated).encode()
)));
-
- check_session_in_state(&battleship, main_account, Some(session));
+ session.expires += 3000;
+ check_session_in_state(&battleship, USER_ID[0], Some(session));
let ships = Ships {
ship_1: vec![19],
@@ -518,83 +521,84 @@ fn disallow_game_without_required_actions() {
};
// must fail since `StartGame` wasn't indicated in the `allowed_actions`
- let res = battleship.send(
- proxy_account,
+ battleship.send(
+ USER_ID[1],
BattleshipAction::StartGame {
ships: ships.clone(),
- session_for_account: Some(main_account.into()),
+ session_for_account: Some(USER_ID[0].into()),
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- proxy_account,
+ USER_ID[1],
Err::(BattleshipError::MessageIsNotAllowed).encode()
)));
// delete session and create a new one
- let res = battleship.send(main_account, BattleshipAction::DeleteSessionFromAccount);
+ battleship.send(USER_ID[0], BattleshipAction::DeleteSessionFromAccount);
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionDeleted).encode()
)));
- check_session_in_state(&battleship, main_account, None);
+ check_session_in_state(&battleship, USER_ID[0], None);
- let session = Session {
- key: proxy_account.into(),
+ let mut session = Session {
+ key: USER_ID[1].into(),
expires: system.block_timestamp() + duration,
allowed_actions: vec![ActionsForSession::StartGame],
};
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions: session.allowed_actions.clone(),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionCreated).encode()
)));
+ session.expires += 3000;
+ check_session_in_state(&battleship, USER_ID[0], Some(session));
- check_session_in_state(&battleship, main_account, Some(session));
-
- // start game from proxy_account
- let res = battleship.send(
- proxy_account,
+ // start game from USER_ID[1]
+ battleship.send(
+ USER_ID[1],
BattleshipAction::StartGame {
ships,
- session_for_account: Some(main_account.into()),
+ session_for_account: Some(USER_ID[0].into()),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- proxy_account,
+ USER_ID[1],
Ok::(BattleshipReply::MessageSentToBot).encode()
)));
// must fail since `Turn` wasn't indicated in the `allowed_actions`
let steps: Vec = (0..25).collect();
for step in steps {
- let game = get_game(&battleship, main_account);
+ let game = get_game(&battleship, USER_ID[0]);
if (game.bot_board[step as usize] == Entity::Empty
|| game.bot_board[step as usize] == Entity::Ship)
&& !game.game_over
{
- let res = battleship.send(
- proxy_account,
+ battleship.send(
+ USER_ID[1],
BattleshipAction::Turn {
step,
- session_for_account: Some(main_account.into()),
+ session_for_account: Some(USER_ID[0].into()),
},
);
- assert!(!res.main_failed());
+ let res = system.run_next_block();
assert!(res.contains(&(
- proxy_account,
+ USER_ID[1],
Err::(BattleshipError::MessageIsNotAllowed)
.encode()
)));
@@ -607,35 +611,34 @@ fn disallow_game_without_required_actions() {
fn complete_session_game() {
let system = System::new();
system.init_logger();
-
- let main_account = 3;
- let proxy_account = 10;
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
+ system.mint_to(USER_ID[1], 100_000_000_000_000);
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
- let duration = MINIMUM_SESSION_SURATION_MS;
- let session = Session {
- key: proxy_account.into(),
+ let duration = MINIMUM_SESSION_DURATION_MS;
+ let mut session = Session {
+ key: USER_ID[1].into(),
expires: system.block_timestamp() + duration,
allowed_actions: vec![ActionsForSession::StartGame, ActionsForSession::Turn],
};
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions: session.allowed_actions.clone(),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionCreated).encode()
)));
-
- check_session_in_state(&battleship, main_account, Some(session));
+ session.expires += 3000;
+ check_session_in_state(&battleship, USER_ID[0], Some(session));
let ships = Ships {
ship_1: vec![19],
@@ -644,38 +647,39 @@ fn complete_session_game() {
ship_4: vec![16, 21],
};
- // start game from proxy_account
- let res = battleship.send(
- proxy_account,
+ // start game from USER_ID[1]
+ battleship.send(
+ USER_ID[1],
BattleshipAction::StartGame {
ships,
- session_for_account: Some(main_account.into()),
+ session_for_account: Some(USER_ID[0].into()),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- proxy_account,
+ USER_ID[1],
Ok::(BattleshipReply::MessageSentToBot).encode()
)));
let steps: Vec = (0..25).collect();
for step in steps {
- let game = get_game(&battleship, main_account);
+ let game = get_game(&battleship, USER_ID[0]);
if (game.bot_board[step as usize] == Entity::Empty
|| game.bot_board[step as usize] == Entity::Ship)
&& !game.game_over
{
- let res = battleship.send(
- proxy_account,
+ battleship.send(
+ USER_ID[1],
BattleshipAction::Turn {
step,
- session_for_account: Some(main_account.into()),
+ session_for_account: Some(USER_ID[0].into()),
},
);
- let game = get_game(&battleship, main_account);
+ let res = system.run_next_block();
+ let game = get_game(&battleship, USER_ID[0]);
if game.game_over {
assert!(res.contains(&(
- proxy_account,
+ USER_ID[1],
Ok::(BattleshipReply::GameFinished(
BattleshipParticipants::Player
))
@@ -683,7 +687,7 @@ fn complete_session_game() {
)));
} else {
assert!(res.contains(&(
- proxy_account,
+ USER_ID[1],
Ok::(BattleshipReply::MessageSentToBot)
.encode()
)));
@@ -698,44 +702,44 @@ fn complete_session_game() {
fn premature_session_deletion_by_user() {
let system = System::new();
system.init_logger();
-
- let main_account = 3;
- let proxy_account = 10;
+ system.mint_to(USER_ID[0], 100_000_000_000_000);
+ system.mint_to(USER_ID[1], 100_000_000_000_000);
init_battleship(&system);
let battleship = system.get_program(1).unwrap();
- let duration = MINIMUM_SESSION_SURATION_MS;
- let session = Session {
- key: proxy_account.into(),
+ let duration = MINIMUM_SESSION_DURATION_MS;
+ let mut session = Session {
+ key: USER_ID[1].into(),
expires: system.block_timestamp() + duration,
allowed_actions: vec![ActionsForSession::Turn],
};
- let res = battleship.send(
- main_account,
+ battleship.send(
+ USER_ID[0],
BattleshipAction::CreateSession {
- key: proxy_account.into(),
+ key: USER_ID[1].into(),
duration,
allowed_actions: session.allowed_actions.clone(),
},
);
-
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionCreated).encode()
)));
-
- check_session_in_state(&battleship, main_account, Some(session));
+ session.expires += 3000;
+ check_session_in_state(&battleship, USER_ID[0], Some(session));
// delete session
- let res = battleship.send(main_account, BattleshipAction::DeleteSessionFromAccount);
+ battleship.send(USER_ID[0], BattleshipAction::DeleteSessionFromAccount);
+ let res = system.run_next_block();
assert!(res.contains(&(
- main_account,
+ USER_ID[0],
Ok::(BattleshipReply::SessionDeleted).encode()
)));
- check_session_in_state(&battleship, main_account, None);
+ check_session_in_state(&battleship, USER_ID[0], None);
}
fn check_session_in_state(battleship: &Program<'_>, account: u64, session: Option) {
diff --git a/contracts/battleship/tests/test_bot.rs b/contracts/battleship/tests/test_bot.rs
index 1e50c999d..196b78f0c 100644
--- a/contracts/battleship/tests/test_bot.rs
+++ b/contracts/battleship/tests/test_bot.rs
@@ -3,20 +3,25 @@ use battleship_io::Entity;
use gstd::prelude::*;
use gtest::{Program, System};
+const USER_ID: u64 = 3;
+
#[test]
fn test() {
let system = System::new();
system.init_logger();
+ system.mint_to(USER_ID, 100_000_000_000_000);
let battleship = Program::from_file(
&system,
"../target/wasm32-unknown-unknown/release/battleship_bot.opt.wasm",
);
- let res = battleship.send(2, 0);
- assert!(!res.main_failed());
- let res = battleship.send(2, BotBattleshipAction::Start);
- assert!(!res.main_failed());
+ let mid = battleship.send(USER_ID, 0);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+ let mid = battleship.send(USER_ID, BotBattleshipAction::Start);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
let mut board = vec![Entity::Unknown; 25];
board[12] = Entity::BoomShip;
@@ -24,6 +29,7 @@ fn test() {
board[3] = Entity::DeadShip;
board[14] = Entity::DeadShip;
board[17] = Entity::Boom;
- let res = battleship.send(2, BotBattleshipAction::Turn(board));
- assert!(!res.main_failed());
+ let mid = battleship.send(USER_ID, BotBattleshipAction::Turn(board));
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
}
diff --git a/contracts/car-races/Cargo.toml b/contracts/car-races/Cargo.toml
deleted file mode 100644
index c0e4ec4dc..000000000
--- a/contracts/car-races/Cargo.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[package]
-name = "car-races"
-version.workspace = true
-authors.workspace = true
-edition.workspace = true
-license.workspace = true
-
-[dependencies]
-gstd = { workspace = true}
-car-races-io = { path = "io" }
-primitive-types.workspace = true
-
-[build-dependencies]
-gear-wasm-builder.workspace = true
-car-races-io = { path = "io" }
-
-[dev-dependencies]
-gtest.workspace = true
-gclient.workspace = true
-tokio.workspace = true
-hex.workspace = true
-gear-core.workspace = true
-car-1 = { path = "car-1" }
-car-2 = { path = "car-2" }
-car-3 = { path = "car-3" }
diff --git a/contracts/car-races/README.md b/contracts/car-races/README.md
index e3dc90738..aa0787c22 100644
--- a/contracts/car-races/README.md
+++ b/contracts/car-races/README.md
@@ -1,32 +1,19 @@
-[![Open in Gitpod](https://img.shields.io/badge/Open_in-Gitpod-white?logo=gitpod)](https://gitpod.io/#FOLDER=vara-man/https://github.com/gear-foundation/dapps)
-[![Docs](https://img.shields.io/github/actions/workflow/status/gear-foundation/dapps/contracts.yml?logo=rust&label=docs)](https://dapps.gear.rs/car-races_io)
-
# Car Races
+This project is a competitive environment where strategy-based programs race against each other, aiming to optimize speed, tactics, and resource management on the track. Each program operates autonomously, employing unique strategies to outmaneuver opponents and complete the race as efficiently as possible.
+
+A detailed description of the project can be found on the [wiki](https://wiki.vara.network/docs/examples/Gaming/racingcars).
+
+⚙️ **Note**: The project code is developed using the [Sails](https://github.com/gear-tech/sails) framework.
+
### 🏗️ Building
```sh
-cargo b -p "car-races*"
-```
-```sh
-cargo b -p "car-1*"
-```
-```sh
-cargo b -p "car-2*"
-```
-```sh
-cargo b -p "car-3*"
+cargo b -r -p "car-races"
```
-### ✅ Testing
-Run all tests, except `gclient` ones:
-```sh
-cargo t -p "car-races*" -- --skip gclient
-```
+### ✅ Testing
-Run all tests:
```sh
-# Download the node binary.
-cargo xtask node
-cargo t -p "car-races*"
+cargo t -r -p "car-races-app"
```
diff --git a/contracts/car-races/app/Cargo.toml b/contracts/car-races/app/Cargo.toml
new file mode 100644
index 000000000..e396c23fb
--- /dev/null
+++ b/contracts/car-races/app/Cargo.toml
@@ -0,0 +1,17 @@
+[package]
+name = "car-races-app"
+version.workspace = true
+edition.workspace = true
+
+[dependencies]
+sails-rs.workspace = true
+parity-scale-codec.workspace = true
+scale-info.workspace = true
+gstd.workspace = true
+session-service.workspace = true
+
+[build-dependencies]
+sails-client-gen.workspace = true
+
+[dev-dependencies]
+gtest.workspace = true
diff --git a/contracts/car-races/app/src/lib.rs b/contracts/car-races/app/src/lib.rs
new file mode 100644
index 000000000..cf93dab1b
--- /dev/null
+++ b/contracts/car-races/app/src/lib.rs
@@ -0,0 +1,34 @@
+#![no_std]
+
+use sails_rs::prelude::*;
+pub mod services;
+use services::{
+ session::{Config, SessionService},
+ CarRacesService, InitConfig,
+};
+
+use session_service::*;
+
+#[derive(Default)]
+pub struct Program;
+
+#[program]
+impl Program {
+ pub async fn new(
+ init_config: InitConfig,
+ session_config: Config,
+ dns_id_and_name: Option<(ActorId, String)>,
+ ) -> Self {
+ CarRacesService::init(init_config, dns_id_and_name).await;
+ SessionService::init(session_config);
+ Self
+ }
+
+ pub fn car_races_service(&self) -> CarRacesService {
+ CarRacesService::new()
+ }
+
+ pub fn session(&self) -> SessionService {
+ SessionService::new()
+ }
+}
diff --git a/contracts/car-races/app/src/services/error.rs b/contracts/car-races/app/src/services/error.rs
new file mode 100644
index 000000000..db095e1b5
--- /dev/null
+++ b/contracts/car-races/app/src/services/error.rs
@@ -0,0 +1,15 @@
+use sails_rs::prelude::*;
+
+#[derive(Debug, Encode, Decode, TypeInfo, Clone, PartialEq, Eq)]
+pub enum Error {
+ MessageProcessingSuspended,
+ MustBeTwoStrategies,
+ NotAdmin,
+ NoMessagesForApproval,
+ NoSession,
+ GameAlreadyStarted,
+ DurationTooSmall,
+ NotPlayerTurn,
+ NotProgram,
+ UnexpectedState,
+}
diff --git a/contracts/car-races/app/src/services/game.rs b/contracts/car-races/app/src/services/game.rs
new file mode 100644
index 000000000..84499fc05
--- /dev/null
+++ b/contracts/car-races/app/src/services/game.rs
@@ -0,0 +1,247 @@
+use super::{config, Error};
+use sails_rs::{collections::BTreeMap, prelude::*};
+
+pub const DEFAULT_SPEED: u32 = 100;
+
+#[derive(Encode, Decode, TypeInfo, Clone, Debug)]
+pub struct Car {
+ pub position: u32,
+ pub speed: u32,
+ pub car_actions: Vec,
+ pub round_result: Option,
+}
+
+#[derive(Encode, Decode, TypeInfo, Default, PartialEq, Eq, Debug, Clone)]
+pub enum GameState {
+ #[default]
+ ReadyToStart,
+ Race,
+ Stopped,
+ Finished,
+ PlayerAction,
+}
+
+#[derive(Encode, Decode, TypeInfo, Default, Clone, Debug)]
+pub struct Game {
+ pub cars: BTreeMap,
+ pub car_ids: Vec,
+ pub current_turn: u8,
+ pub state: GameState,
+ pub result: Option,
+ pub current_round: u32,
+ pub last_time_step: u64,
+}
+
+#[derive(Encode, Decode, TypeInfo, Clone, Debug)]
+pub enum GameResult {
+ Win,
+ Draw,
+ Lose,
+}
+
+#[derive(Encode, Decode, TypeInfo, Debug)]
+pub enum StrategyAction {
+ BuyAcceleration,
+ BuyShell,
+ Skip,
+}
+
+#[derive(Encode, Decode, TypeInfo, Debug, Clone, PartialEq, Eq)]
+pub enum RoundAction {
+ Accelerated,
+ SlowedDown,
+ SlowedDownAndAccelerated,
+}
+
+#[derive(Encode, Decode, TypeInfo)]
+pub enum CarAction {
+ YourTurn(BTreeMap),
+}
+
+#[derive(Debug, Clone, Encode, Decode, TypeInfo)]
+pub enum GameError {
+ NotAdmin,
+ MustBeTwoStrategies,
+ GameAlreadyStarted,
+ NotPlayerTurn,
+ NotProgram,
+ MessageProcessingSuspended,
+}
+
+impl Game {
+ pub async fn process_car_turn(&mut self) -> Result<(), Error> {
+ let car_id = self.get_current_car_id();
+
+ let payload_bytes = [
+ "CarStrategy".encode(),
+ "MakeMove".encode(),
+ self.cars.clone().encode(),
+ ]
+ .concat();
+
+ let bytes = gstd::msg::send_bytes_with_gas_for_reply(
+ car_id,
+ payload_bytes,
+ config().gas_for_round,
+ 0,
+ config().gas_for_reply_deposit,
+ )
+ .expect("Error in sending a message")
+ .await
+ .expect("Error in receiving reply");
+
+ if let Ok((_, _, strategy_action)) =
+ <(String, String, StrategyAction)>::decode(&mut bytes.as_ref())
+ {
+ self.apply_strategy_move(strategy_action);
+ } else {
+ // car eliminated from race for wrong payload
+ self.car_ids.retain(|id| *id != car_id);
+ }
+
+ let num_of_cars = self.car_ids.len() as u8;
+ self.current_turn = (self.current_turn + 1) % num_of_cars;
+
+ Ok(())
+ }
+
+ pub fn apply_strategy_move(&mut self, strategy_move: StrategyAction) {
+ match strategy_move {
+ StrategyAction::BuyAcceleration => {
+ self.buy_acceleration();
+ }
+ StrategyAction::BuyShell => {
+ self.buy_shell();
+ }
+ StrategyAction::Skip => {}
+ }
+ }
+
+ pub fn buy_acceleration(&mut self) {
+ let car_id = self.get_current_car_id();
+ let car = self.cars.get_mut(&car_id).expect("Get Car: Can't be None");
+ car.speed = car.speed.saturating_add(DEFAULT_SPEED);
+ car.car_actions.push(RoundAction::Accelerated);
+ }
+
+ pub fn buy_shell(&mut self) {
+ let car_id = self.get_current_car_id();
+
+ let shelled_car_id = self.find_car_to_shell(&car_id);
+ self.cars.entry(shelled_car_id).and_modify(|car| {
+ let new_speed = car.speed.saturating_sub(DEFAULT_SPEED);
+ car.speed = new_speed.max(DEFAULT_SPEED);
+ car.car_actions.push(RoundAction::SlowedDown);
+ });
+ }
+
+ pub fn get_current_car_id(&self) -> ActorId {
+ self.car_ids[self.current_turn as usize]
+ }
+
+ pub fn update_positions(&mut self) {
+ let mut winners = Vec::with_capacity(3);
+ for (car_id, car) in self.cars.iter_mut() {
+ car.position = car.position.saturating_add(car.speed * config().time);
+ if car.position >= config().max_distance {
+ self.state = GameState::Finished;
+ winners.push((*car_id, car.position));
+ }
+
+ if !car.car_actions.is_empty() {
+ car.round_result = if car.car_actions.contains(&RoundAction::Accelerated)
+ && car.car_actions.contains(&RoundAction::SlowedDown)
+ {
+ Some(RoundAction::SlowedDownAndAccelerated)
+ } else if car.car_actions.contains(&RoundAction::Accelerated) {
+ Some(RoundAction::Accelerated)
+ } else {
+ Some(RoundAction::SlowedDown)
+ };
+ car.car_actions = Vec::new();
+ } else {
+ car.round_result = None;
+ }
+ }
+ winners.sort_by(|a, b| b.1.cmp(&a.1));
+ if self.state == GameState::Finished {
+ match winners.len() {
+ 1 => {
+ if winners[0].0 == self.car_ids[0] {
+ self.result = Some(GameResult::Win);
+ } else {
+ self.result = Some(GameResult::Lose);
+ }
+ }
+ 2 => {
+ if winners[0].0 == self.car_ids[0] || winners[1].0 == self.car_ids[0] {
+ if winners[0].1 == winners[1].1 {
+ self.result = Some(GameResult::Draw);
+ } else if winners[0].0 == self.car_ids[0] {
+ self.result = Some(GameResult::Win);
+ } else {
+ self.result = Some(GameResult::Lose);
+ }
+ } else {
+ self.result = Some(GameResult::Lose);
+ }
+ }
+ 3 => {
+ if winners[0].1 == winners[1].1 && winners[0].1 == winners[2].1 {
+ self.result = Some(GameResult::Draw);
+ } else if winners[0].1 == winners[1].1 {
+ if winners[0].0 == self.car_ids[0] || winners[1].0 == self.car_ids[0] {
+ self.result = Some(GameResult::Draw);
+ } else {
+ self.result = Some(GameResult::Lose);
+ }
+ } else if winners[0].0 == self.car_ids[0] {
+ self.result = Some(GameResult::Win);
+ } else {
+ self.result = Some(GameResult::Lose);
+ }
+ }
+ _ => {
+ unreachable!();
+ }
+ }
+ }
+ }
+
+ fn find_car_to_shell(&self, car_id: &ActorId) -> ActorId {
+ let mut cars_vec: Vec<(ActorId, Car)> = self
+ .cars
+ .iter()
+ .map(|(car_id, car)| (*car_id, car.clone()))
+ .collect();
+ cars_vec.sort_by(|a, b| b.1.position.cmp(&a.1.position));
+
+ // if the car is the first
+ // then we slowed the car that is behind it
+ if cars_vec[0].0 == *car_id {
+ return cars_vec[1].0;
+ }
+
+ // if the car is the second or the last
+ // then we slowed the first car
+ cars_vec[0].0
+ }
+
+ pub fn verify_game_state(&mut self) -> Result<(), Error> {
+ if self.state != GameState::PlayerAction {
+ Err(Error::NotPlayerTurn)
+ } else {
+ Ok(())
+ }
+ }
+
+ pub fn is_player_action_or_finished(&self) -> bool {
+ self.state == GameState::PlayerAction || self.state == GameState::Finished
+ }
+}
+
+#[derive(Debug, Default, Encode, Decode, TypeInfo, Clone)]
+pub struct RoundInfo {
+ pub cars: Vec<(ActorId, u32, Option)>,
+ pub result: Option,
+}
diff --git a/contracts/car-races/app/src/services/mod.rs b/contracts/car-races/app/src/services/mod.rs
new file mode 100644
index 000000000..bfcb45598
--- /dev/null
+++ b/contracts/car-races/app/src/services/mod.rs
@@ -0,0 +1,388 @@
+#![allow(clippy::new_without_default)]
+use collections::HashMap;
+use sails_rs::prelude::*;
+use session::Storage as SessionStorage;
+use session::{ActionsForSession, SessionData};
+pub mod error;
+pub mod game;
+pub mod session;
+pub mod utils;
+use crate::services::utils::{panic, panicking};
+use error::Error;
+use game::*;
+pub struct CarRacesService;
+
+use gstd::{exec, msg};
+static mut DATA: Option = None;
+static mut CONFIG: Option = None;
+
+#[derive(Debug, Default)]
+pub struct ContractData {
+ admins: Vec,
+ strategy_ids: Vec,
+ games: HashMap,
+ messages_allowed: bool,
+ dns_info: Option<(ActorId, String)>,
+}
+
+#[derive(Debug, Decode, Encode, TypeInfo)]
+pub struct InitConfig {
+ pub config: Config,
+}
+
+#[derive(Debug, Decode, Encode, TypeInfo, Clone)]
+pub struct Config {
+ pub gas_to_remove_game: u64,
+ pub initial_speed: u32,
+ pub min_speed: u32,
+ pub max_speed: u32,
+ pub gas_for_round: u64,
+ pub time_interval: u32,
+ pub max_distance: u32,
+ pub time: u32,
+ pub time_for_game_storage: u64,
+ pub block_duration_ms: u64,
+ pub gas_for_reply_deposit: u64,
+}
+
+#[derive(Debug, Decode, Encode, TypeInfo)]
+pub enum Event {
+ RoundInfo(RoundInfo),
+ GameFinished { player: ActorId },
+ Killed { inheritor: ActorId },
+}
+#[service(events = Event)]
+impl CarRacesService {
+ pub fn allow_messages(&mut self, messages_allowed: bool) {
+ let msg_src = msg::source();
+ assert!(self.data().admins.contains(&msg_src), "Not admin");
+ self.data_mut().messages_allowed = messages_allowed;
+ }
+
+ pub async fn kill(&mut self, inheritor: ActorId) {
+ let msg_src = msg::source();
+ assert!(self.data().admins.contains(&msg_src), "Not admin");
+
+ if let Some((id, _name)) = &self.data().dns_info {
+ let request = ["Dns".encode(), "DeleteMe".to_string().encode(), ().encode()].concat();
+
+ msg::send_bytes_with_gas_for_reply(*id, request, 5_000_000_000, 0, 0)
+ .expect("Error in sending message")
+ .await
+ .expect("Error in `AddNewProgram`");
+ }
+
+ self.notify_on(Event::Killed { inheritor })
+ .expect("Notification Error");
+ exec::exit(inheritor);
+ }
+
+ pub fn add_strategy_ids(&mut self, car_ids: Vec) {
+ let msg_src = msg::source();
+ assert!(self.data().messages_allowed, "Message processing suspended");
+ assert!(self.data().admins.contains(&msg_src), "Not admin");
+ assert_eq!(car_ids.len(), 2, "Must be two strategies");
+ self.data_mut().strategy_ids = car_ids;
+ }
+
+ pub fn start_game(&mut self, session_for_account: Option) {
+ assert!(self.data().messages_allowed, "Message processing suspended");
+ let msg_src = msg::source();
+ let sessions = SessionStorage::get_session_map();
+ let player = get_player(
+ sessions,
+ &msg_src,
+ &session_for_account,
+ ActionsForSession::StartGame,
+ );
+ let last_time_step = exec::block_timestamp();
+ let strategy_ids = self.data().strategy_ids.clone();
+
+ let game = if let Some(game) = self.data_mut().games.get_mut(&player) {
+ assert!(game.state == GameState::Finished, "Game already started");
+ game.current_round = 0;
+ game.result = None;
+ game.last_time_step = last_time_step;
+ game
+ } else {
+ self.data_mut().games.entry(player).or_insert_with(|| Game {
+ last_time_step,
+ ..Default::default()
+ })
+ };
+
+ game.car_ids = vec![player, strategy_ids[0], strategy_ids[1]];
+ let initial_state = Car {
+ position: 0,
+ speed: config().initial_speed,
+ car_actions: Vec::new(),
+ round_result: None,
+ };
+
+ game.cars.insert(player, initial_state.clone());
+ game.cars.insert(strategy_ids[0], initial_state.clone());
+ game.cars.insert(strategy_ids[1], initial_state);
+
+ game.state = GameState::PlayerAction;
+ }
+
+ pub async fn player_move(
+ &mut self,
+ strategy_move: StrategyAction,
+ session_for_account: Option,
+ ) {
+ assert!(self.data().messages_allowed, "Message processing suspended");
+ let msg_src = msg::source();
+ let sessions = SessionStorage::get_session_map();
+
+ let player = get_player(
+ sessions,
+ &msg_src,
+ &session_for_account,
+ ActionsForSession::Move,
+ );
+ let game_instance = self.get_game(&player);
+
+ panicking(game_instance.verify_game_state());
+
+ game_instance.apply_strategy_move(strategy_move);
+
+ game_instance.state = GameState::Race;
+ game_instance.last_time_step = exec::block_timestamp();
+
+ let num_of_cars = game_instance.car_ids.len() as u8;
+
+ game_instance.current_turn = (game_instance.current_turn + 1) % num_of_cars;
+
+ let mut round_info: Option = None;
+ let mut game_finished = false;
+ while !game_instance.is_player_action_or_finished() {
+ panicking(game_instance.process_car_turn().await);
+ if game_instance.current_turn == 0 {
+ game_instance.state = GameState::PlayerAction;
+ game_instance.current_round = game_instance.current_round.saturating_add(1);
+
+ game_instance.update_positions();
+
+ round_info = Some(create_round_info(game_instance));
+
+ if game_instance.state == GameState::Finished {
+ send_msg_to_remove_game_instance(player);
+ game_finished = true;
+ }
+ }
+ }
+
+ match round_info {
+ Some(info) => {
+ self.notify_on(Event::RoundInfo(info))
+ .expect("Notification Error");
+ if game_finished {
+ self.notify_on(Event::GameFinished { player: msg_src })
+ .expect("Notification Error");
+ }
+ }
+ None => {
+ panic(Error::UnexpectedState);
+ }
+ }
+ }
+
+ pub fn remove_game_instance(&mut self, account: ActorId) {
+ assert_eq!(msg::source(), exec::program_id(), "Not program");
+
+ let game = self
+ .data()
+ .games
+ .get(&account)
+ .expect("Unexpected: the game does not exist");
+
+ if game.state == GameState::Finished {
+ self.data_mut().games.remove(&account);
+ };
+ }
+
+ pub fn remove_instances(&mut self, player_ids: Option>) {
+ let msg_src = msg::source();
+ assert!(self.data().admins.contains(&msg_src), "Not admin");
+ match player_ids {
+ Some(player_ids) => {
+ for player_id in player_ids {
+ self.data_mut().games.remove(&player_id);
+ }
+ }
+ None => {
+ self.data_mut().games.retain(|_, game| {
+ (exec::block_timestamp() - game.last_time_step) < config().time_for_game_storage
+ });
+ }
+ }
+ }
+
+ pub fn add_admin(&mut self, admin: ActorId) {
+ let msg_src = msg::source();
+ assert!(self.data().admins.contains(&msg_src), "Not admin");
+ self.data_mut().admins.push(admin);
+ }
+
+ pub fn remove_admin(&mut self, admin: ActorId) {
+ let msg_src = msg::source();
+ assert!(self.data().admins.contains(&msg_src), "Not admin");
+ self.data_mut().admins.retain(|id| *id != admin);
+ }
+
+ pub fn update_config(&mut self, config: Config) {
+ let msg_src = msg::source();
+ assert!(self.data().admins.contains(&msg_src), "Not admin");
+
+ unsafe {
+ CONFIG = Some(config);
+ }
+ }
+
+ pub fn admins(&self) -> Vec {
+ self.data().admins.clone()
+ }
+
+ pub fn strategy_ids(&self) -> Vec {
+ self.data().strategy_ids.clone()
+ }
+
+ pub fn game(&self, account_id: ActorId) -> Option {
+ self.data().games.get(&account_id).cloned()
+ }
+
+ pub fn all_games(&self) -> Vec<(ActorId, Game)> {
+ self.data().games.clone().into_iter().collect()
+ }
+
+ pub fn config_state(&self) -> Config {
+ config().clone()
+ }
+
+ pub fn messages_allowed(&self) -> bool {
+ self.data().messages_allowed
+ }
+
+ fn get_game(&mut self, account: &ActorId) -> &mut Game {
+ self.data_mut()
+ .games
+ .get_mut(account)
+ .expect("Game does not exist")
+ }
+
+ pub fn dns_info(&self) -> Option<(ActorId, String)> {
+ self.data().dns_info.clone()
+ }
+}
+
+impl CarRacesService {
+ pub async fn init(config: InitConfig, dns_id_and_name: Option<(ActorId, String)>) {
+ unsafe {
+ DATA = Some(ContractData {
+ admins: vec![msg::source()],
+ games: HashMap::with_capacity(20_000),
+ dns_info: dns_id_and_name.clone(),
+ ..Default::default()
+ });
+ CONFIG = Some(config.config);
+ }
+ if let Some((id, name)) = dns_id_and_name {
+ let request = [
+ "Dns".encode(),
+ "AddNewProgram".to_string().encode(),
+ (name, exec::program_id()).encode(),
+ ]
+ .concat();
+
+ msg::send_bytes_with_gas_for_reply(id, request, 5_000_000_000, 0, 0)
+ .expect("Error in sending message")
+ .await
+ .expect("Error in `AddNewProgram`");
+ }
+ }
+ pub fn new() -> Self {
+ Self
+ }
+
+ fn data(&self) -> &ContractData {
+ unsafe {
+ DATA.as_ref()
+ .expect("CarRacesService::seed() should be called")
+ }
+ }
+
+ fn data_mut(&mut self) -> &mut ContractData {
+ unsafe {
+ DATA.as_mut()
+ .expect("CarRacesService::seed() should be called")
+ }
+ }
+}
+
+fn create_round_info(game: &Game) -> RoundInfo {
+ let mut cars = Vec::new();
+ for (car_id, info) in game.cars.clone().iter() {
+ cars.push((*car_id, info.position, info.round_result.clone()));
+ }
+ RoundInfo {
+ cars,
+ result: game.result.clone(),
+ }
+}
+
+fn send_msg_to_remove_game_instance(player: ActorId) {
+ let payload_bytes = [
+ "CarRacesService".encode(),
+ "RemoveGameInstance".encode(),
+ player.encode(),
+ ]
+ .concat();
+
+ msg::send_bytes_with_gas_delayed(
+ exec::program_id(),
+ payload_bytes,
+ config().gas_to_remove_game,
+ 0,
+ config().time_interval,
+ )
+ .expect("Error in sending message");
+}
+
+fn get_player(
+ session_map: &HashMap,
+ msg_source: &ActorId,
+ session_for_account: &Option,
+ actions_for_session: ActionsForSession,
+) -> ActorId {
+ let player = match session_for_account {
+ Some(account) => {
+ let session = session_map
+ .get(account)
+ .expect("This account has no valid session");
+ assert!(
+ session.expires > exec::block_timestamp(),
+ "The session has already expired"
+ );
+ assert!(
+ session.allowed_actions.contains(&actions_for_session),
+ "This message is not allowed"
+ );
+ assert_eq!(
+ session.key, *msg_source,
+ "The account is not approved for this session"
+ );
+ *account
+ }
+ None => *msg_source,
+ };
+ player
+}
+
+pub fn config() -> &'static Config {
+ unsafe {
+ CONFIG
+ .as_ref()
+ .expect("CarRacesService::seed() should be called")
+ }
+}
diff --git a/contracts/car-races/app/src/services/session.rs b/contracts/car-races/app/src/services/session.rs
new file mode 100644
index 000000000..6e3cd7cc4
--- /dev/null
+++ b/contracts/car-races/app/src/services/session.rs
@@ -0,0 +1,11 @@
+use sails_rs::prelude::*;
+use session_service::*;
+
+#[derive(Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq)]
+pub enum ActionsForSession {
+ StartGame,
+ Move,
+ Skip,
+}
+
+generate_session_system!(ActionsForSession);
diff --git a/contracts/car-races/app/src/services/utils.rs b/contracts/car-races/app/src/services/utils.rs
new file mode 100644
index 000000000..947f89f46
--- /dev/null
+++ b/contracts/car-races/app/src/services/utils.rs
@@ -0,0 +1,13 @@
+use sails_rs::fmt::Debug;
+use sails_rs::format;
+
+pub fn panicking(res: Result) -> T {
+ match res {
+ Ok(v) => v,
+ Err(e) => panic(e),
+ }
+}
+
+pub fn panic(err: impl Debug) -> ! {
+ panic!("{}", &format!("{err:?}"))
+}
diff --git a/contracts/car-races/app/tests/test.rs b/contracts/car-races/app/tests/test.rs
new file mode 100644
index 000000000..36f4f473a
--- /dev/null
+++ b/contracts/car-races/app/tests/test.rs
@@ -0,0 +1,161 @@
+use car_races_app::services::{
+ game::{Game, GameState, StrategyAction},
+ session::Config as SessionConfig,
+ Config, InitConfig,
+};
+use gtest::{Program, System};
+use sails_rs::{prelude::*, ActorId};
+const PATH_TO_STRATEGIES: [&str; 2] = [
+ "../../target/wasm32-unknown-unknown/release/car_strategy_1.opt.wasm",
+ "../../target/wasm32-unknown-unknown/release/car_strategy_2.opt.wasm",
+];
+
+const PATH_TO_CAR_RACES: &str = "../../target/wasm32-unknown-unknown/release/car_races.opt.wasm";
+
+#[test]
+fn test_car_races_without_session() {
+ let system = System::new();
+ system.init_logger();
+ system.mint_to(10, 100_000_000_000_000);
+
+ // upload strategy 1
+ let car_strategy_1 = Program::from_file(&system, PATH_TO_STRATEGIES[0]);
+ let payload = ["New".encode()].concat();
+ let mid = car_strategy_1.send_bytes(10, payload);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+
+ // upload strategy 2
+ let car_strategy_2 = Program::from_file(&system, PATH_TO_STRATEGIES[1]);
+ let payload = ["New".encode()].concat();
+ let mid = car_strategy_2.send_bytes(10, payload);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+
+ // upload car races
+ let car_races = Program::from_file(&system, PATH_TO_CAR_RACES);
+ let init_config = InitConfig {
+ config: Config {
+ gas_to_remove_game: 20_000_000_000,
+ initial_speed: 100,
+ min_speed: 10,
+ max_speed: 2000,
+ gas_for_round: 100_000_000_000,
+ time_interval: 20,
+ max_distance: 3242,
+ time: 1,
+ time_for_game_storage: 200,
+ block_duration_ms: 3000,
+ gas_for_reply_deposit: 15_000_000_000,
+ },
+ };
+ let session_config = SessionConfig {
+ gas_to_delete_session: 10_000_000_000,
+ minimum_session_duration_ms: 180_000,
+ ms_per_block: 3_000,
+ };
+
+ let dns_id_and_name: Option<(ActorId, String)> = None;
+ let payload = [
+ "New".encode(),
+ (init_config, session_config, dns_id_and_name).encode(),
+ ]
+ .concat();
+
+ let mid = car_races.send_bytes(10, payload);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+
+ // allow messages
+ let payload = [
+ "CarRacesService".encode(),
+ "AllowMessages".encode(),
+ true.encode(),
+ ]
+ .concat();
+ let mid = car_races.send_bytes(10, payload);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+
+ // add strategy ids
+ let payload = [
+ "CarRacesService".encode(),
+ "AddStrategyIds".encode(),
+ vec![car_strategy_1.id(), car_strategy_2.id()].encode(),
+ ]
+ .concat();
+ let mid = car_races.send_bytes(10, payload);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+
+ // start game
+ let session_for_account: Option = None;
+ let payload = [
+ "CarRacesService".encode(),
+ "StartGame".encode(),
+ session_for_account.encode(),
+ ]
+ .concat();
+ let mid = car_races.send_bytes(10, payload);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+
+ let mut game = if let Some(game) = get_game(&system, &car_races, 10.into()) {
+ game
+ } else {
+ std::panic!("Game does not exist")
+ };
+
+ while game.state != GameState::Finished {
+ // make move (always accelerate)
+ let session_for_account: Option = None;
+ let payload = [
+ "CarRacesService".encode(),
+ "PlayerMove".encode(),
+ (StrategyAction::BuyAcceleration, session_for_account).encode(),
+ ]
+ .concat();
+
+ let mid = car_races.send_bytes(10, payload);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+
+ game = if let Some(game) = get_game(&system, &car_races, 10.into()) {
+ game
+ } else {
+ std::panic!("Game does not exist")
+ };
+ }
+
+ // try to start game again
+ let payload = [
+ "CarRacesService".encode(),
+ "StartGame".encode(),
+ session_for_account.encode(),
+ ]
+ .concat();
+ let mid = car_races.send_bytes(10, payload);
+ let res = system.run_next_block();
+ assert!(res.succeed.contains(&mid));
+}
+
+fn get_game(sys: &System, car_races: &Program<'_>, account: ActorId) -> Option {
+ let payload = [
+ "CarRacesService".encode(),
+ "Game".encode(),
+ account.encode(),
+ ]
+ .concat();
+ car_races.send_bytes(10, payload);
+ let result = sys.run_next_block();
+ let log_entry = result
+ .log()
+ .iter()
+ .find(|log_entry| log_entry.destination() == 10.into())
+ .expect("Unable to get reply");
+
+ let reply = <(String, String, Option)>::decode(&mut log_entry.payload())
+ .expect("Unable to decode reply"); // Panic if decoding fails
+
+ reply.2
+}
diff --git a/contracts/car-races/build.rs b/contracts/car-races/build.rs
deleted file mode 100644
index d703927b9..000000000
--- a/contracts/car-races/build.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-use car_races_io::ContractMetadata;
-
-fn main() {
- gear_wasm_builder::build_with_metadata::();
-}
diff --git a/contracts/car-races/car-1/Cargo.toml b/contracts/car-races/car-1/Cargo.toml
index 1240d529a..4425edf56 100644
--- a/contracts/car-races/car-1/Cargo.toml
+++ b/contracts/car-races/car-1/Cargo.toml
@@ -1,13 +1,21 @@
-[package]
-name = "car-1"
-version = "0.1.0"
-edition = "2021"
-
-[dependencies]
-gstd = { workspace = true, features = ["debug"] }
-scale-info.workspace = true
-parity-scale-codec.workspace = true
-
-[build-dependencies]
-gear-wasm-builder.workspace = true
-
+[package]
+name = "car-strategy-1"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+car-strategy-app-1 = { path = "app" }
+
+[build-dependencies]
+car-strategy-app-1 = { path = "app" }
+sails-rs.workspace = true
+sails-idl-gen.workspace = true
+gear-wasm-builder.workspace = true
+
+[dev-dependencies]
+car-strategy-1 = { path = ".", features = ["wasm-binary"] }
+sails-rs.workspace = true
+tokio.workspace = true
+
+[features]
+wasm-binary = []
diff --git a/contracts/car-races/car-1/README.md b/contracts/car-races/car-1/README.md
new file mode 100644
index 000000000..c0cfd5e7a
--- /dev/null
+++ b/contracts/car-races/car-1/README.md
@@ -0,0 +1,9 @@
+## The **car-strategy** program
+
+The program workspace includes the following packages:
+- `car-strategy` is the package allowing to build WASM binary for the program and IDL file for it.
+ The package also includes integration tests for the program in the `tests` sub-folder
+- `car-strategy-app` is the package containing business logic for the program represented by the `CarStrategyService` structure.
+- `car-strategy-client` is the package containing the client for the program allowing to interact with it from another program, tests, or
+ off-chain client.
+
diff --git a/contracts/car-races/car-1/app/Cargo.toml b/contracts/car-races/car-1/app/Cargo.toml
new file mode 100644
index 000000000..6285243fb
--- /dev/null
+++ b/contracts/car-races/car-1/app/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "car-strategy-app-1"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+sails-rs.workspace = true
+parity-scale-codec.workspace = true
+scale-info.workspace = true
\ No newline at end of file
diff --git a/contracts/car-races/car-1/app/src/lib.rs b/contracts/car-races/car-1/app/src/lib.rs
new file mode 100644
index 000000000..d9f191b33
--- /dev/null
+++ b/contracts/car-races/car-1/app/src/lib.rs
@@ -0,0 +1,54 @@
+#![no_std]
+#![allow(clippy::new_without_default)]
+
+use sails_rs::{collections::BTreeMap, prelude::*};
+struct CarStrategyService(());
+
+#[sails_rs::service]
+impl CarStrategyService {
+ pub fn new() -> Self {
+ Self(())
+ }
+
+ // this car only accelerates
+ pub fn make_move(&mut self, _cars: BTreeMap) -> StrategyAction {
+ StrategyAction::BuyAcceleration
+ }
+}
+
+pub struct CarStrategyProgram(());
+
+#[sails_rs::program]
+impl CarStrategyProgram {
+ // Program's constructor
+ pub fn new() -> Self {
+ Self(())
+ }
+
+ // Exposed service
+ pub fn car_strategy(&self) -> CarStrategyService {
+ CarStrategyService::new()
+ }
+}
+
+#[derive(Encode, Decode, TypeInfo, Clone, Debug)]
+pub struct Car {
+ pub position: u32,
+ pub speed: u32,
+ pub car_actions: Vec,
+ pub round_result: Option,
+}
+
+#[derive(Encode, Decode, TypeInfo, Debug)]
+pub enum StrategyAction {
+ BuyAcceleration,
+ BuyShell,
+ Skip,
+}
+
+#[derive(Encode, Decode, TypeInfo, Debug, Clone, PartialEq, Eq)]
+pub enum RoundAction {
+ Accelerated,
+ SlowedDown,
+ SlowedDownAndAccelerated,
+}
diff --git a/contracts/car-races/car-1/build.rs b/contracts/car-races/car-1/build.rs
index 6836d02c0..b725efb6a 100644
--- a/contracts/car-races/car-1/build.rs
+++ b/contracts/car-races/car-1/build.rs
@@ -1,3 +1,24 @@
+use std::{
+ env,
+ fs::File,
+ io::{BufRead, BufReader},
+ path::PathBuf,
+};
+
fn main() {
gear_wasm_builder::build();
+
+ if env::var("__GEAR_WASM_BUILDER_NO_BUILD").is_ok() {
+ return;
+ }
+
+ let bin_path_file = File::open(".binpath").unwrap();
+ let mut bin_path_reader = BufReader::new(bin_path_file);
+ let mut bin_path = String::new();
+ bin_path_reader.read_line(&mut bin_path).unwrap();
+
+ let mut idl_path = PathBuf::from(bin_path);
+ idl_path.set_extension("idl");
+ sails_idl_gen::generate_idl_to_file::(idl_path)
+ .unwrap();
}
diff --git a/contracts/car-races/car-1/src/lib.rs b/contracts/car-races/car-1/src/lib.rs
index ddda50e5f..4076eca4e 100644
--- a/contracts/car-races/car-1/src/lib.rs
+++ b/contracts/car-races/car-1/src/lib.rs
@@ -1,28 +1,14 @@
#![no_std]
-use codec::{Decode, Encode};
-use gstd::{collections::BTreeMap, msg, prelude::*, ActorId};
-#[derive(Encode, Decode, TypeInfo)]
-pub enum CarAction {
- YourTurn(BTreeMap),
-}
-
-#[derive(Encode, Decode, TypeInfo, Clone)]
-pub struct Car {
- pub balance: u32,
- pub position: u32,
- pub speed: u32,
- pub penalty: u8,
-}
+#[cfg(target_arch = "wasm32")]
+pub use car_strategy_app_1::wasm::*;
-#[derive(Encode, Decode, TypeInfo)]
-pub enum StrategyAction {
- BuyAcceleration,
- BuyShell,
- Skip,
-}
+#[cfg(feature = "wasm-binary")]
+#[cfg(not(target_arch = "wasm32"))]
+pub use code::WASM_BINARY_OPT as WASM_BINARY;
-#[no_mangle]
-extern fn handle() {
- msg::reply(StrategyAction::BuyAcceleration, 0).expect("Error in sending a message");
+#[cfg(feature = "wasm-binary")]
+#[cfg(not(target_arch = "wasm32"))]
+mod code {
+ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
}
diff --git a/contracts/car-races/car-2/Cargo.toml b/contracts/car-races/car-2/Cargo.toml
index ac480fda1..047b54660 100644
--- a/contracts/car-races/car-2/Cargo.toml
+++ b/contracts/car-races/car-2/Cargo.toml
@@ -1,13 +1,21 @@
-[package]
-name = "car-2"
-version = "0.1.0"
-edition = "2021"
-
-[dependencies]
-gstd = { workspace = true, features = ["debug"] }
-scale-info.workspace = true
-parity-scale-codec.workspace = true
-
-[build-dependencies]
-gear-wasm-builder.workspace = true
-
+[package]
+name = "car-strategy-2"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+car-strategy-app-2 = { path = "app" }
+
+[build-dependencies]
+car-strategy-app-2 = { path = "app" }
+sails-rs.workspace = true
+sails-idl-gen.workspace = true
+gear-wasm-builder.workspace = true
+
+[dev-dependencies]
+car-strategy-2 = { path = ".", features = ["wasm-binary"] }
+sails-rs.workspace = true
+tokio.workspace = true
+
+[features]
+wasm-binary = []
diff --git a/contracts/car-races/car-2/README.md b/contracts/car-races/car-2/README.md
new file mode 100644
index 000000000..c0cfd5e7a
--- /dev/null
+++ b/contracts/car-races/car-2/README.md
@@ -0,0 +1,9 @@
+## The **car-strategy** program
+
+The program workspace includes the following packages:
+- `car-strategy` is the package allowing to build WASM binary for the program and IDL file for it.
+ The package also includes integration tests for the program in the `tests` sub-folder
+- `car-strategy-app` is the package containing business logic for the program represented by the `CarStrategyService` structure.
+- `car-strategy-client` is the package containing the client for the program allowing to interact with it from another program, tests, or
+ off-chain client.
+
diff --git a/contracts/car-races/car-2/app/Cargo.toml b/contracts/car-races/car-2/app/Cargo.toml
new file mode 100644
index 000000000..7eeeeb4f0
--- /dev/null
+++ b/contracts/car-races/car-2/app/Cargo.toml
@@ -0,0 +1,10 @@
+[package]
+name = "car-strategy-app-2"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+sails-rs.workspace = true
+gstd.workspace = true
+parity-scale-codec.workspace = true
+scale-info.workspace = true
\ No newline at end of file
diff --git a/contracts/car-races/car-2/app/src/lib.rs b/contracts/car-races/car-2/app/src/lib.rs
new file mode 100644
index 000000000..8410d595b
--- /dev/null
+++ b/contracts/car-races/car-2/app/src/lib.rs
@@ -0,0 +1,71 @@
+#![no_std]
+#![allow(clippy::new_without_default)]
+
+use sails_rs::{collections::BTreeMap, prelude::*};
+struct CarStrategyService(());
+
+#[sails_rs::service]
+impl CarStrategyService {
+ pub fn new() -> Self {
+ Self(())
+ }
+
+ pub fn make_move(&mut self, _cars: BTreeMap) -> StrategyAction {
+ let random_choice = get_random_value(10);
+ match random_choice {
+ 0..=2 => StrategyAction::BuyAcceleration,
+ 3..=9 => StrategyAction::BuyShell,
+ _ => {
+ unreachable!()
+ }
+ }
+ }
+}
+
+static mut SEED: u8 = 0;
+
+pub fn get_random_value(range: u8) -> u8 {
+ let seed = unsafe { SEED };
+ unsafe { SEED = SEED.wrapping_add(1) };
+ let mut random_input: [u8; 32] = gstd::exec::program_id().into();
+ random_input[0] = random_input[0].wrapping_add(seed);
+ let (random, _) = gstd::exec::random(random_input).expect("Error in getting random number");
+ random[0] % range
+}
+
+pub struct CarStrategyProgram(());
+
+#[sails_rs::program]
+impl CarStrategyProgram {
+ // Program's constructor
+ pub fn new() -> Self {
+ Self(())
+ }
+
+ // Exposed service
+ pub fn car_strategy(&self) -> CarStrategyService {
+ CarStrategyService::new()
+ }
+}
+
+#[derive(Encode, Decode, TypeInfo, Clone, Debug)]
+pub struct Car {
+ pub position: u32,
+ pub speed: u32,
+ pub car_actions: Vec,
+ pub round_result: Option,
+}
+
+#[derive(Encode, Decode, TypeInfo, Debug)]
+pub enum StrategyAction {
+ BuyAcceleration,
+ BuyShell,
+ Skip,
+}
+
+#[derive(Encode, Decode, TypeInfo, Debug, Clone, PartialEq, Eq)]
+pub enum RoundAction {
+ Accelerated,
+ SlowedDown,
+ SlowedDownAndAccelerated,
+}
diff --git a/contracts/car-races/car-2/build.rs b/contracts/car-races/car-2/build.rs
index 6836d02c0..8b209c368 100644
--- a/contracts/car-races/car-2/build.rs
+++ b/contracts/car-races/car-2/build.rs
@@ -1,3 +1,24 @@
+use std::{
+ env,
+ fs::File,
+ io::{BufRead, BufReader},
+ path::PathBuf,
+};
+
fn main() {
gear_wasm_builder::build();
+
+ if env::var("__GEAR_WASM_BUILDER_NO_BUILD").is_ok() {
+ return;
+ }
+
+ let bin_path_file = File::open(".binpath").unwrap();
+ let mut bin_path_reader = BufReader::new(bin_path_file);
+ let mut bin_path = String::new();
+ bin_path_reader.read_line(&mut bin_path).unwrap();
+
+ let mut idl_path = PathBuf::from(bin_path);
+ idl_path.set_extension("idl");
+ sails_idl_gen::generate_idl_to_file::(idl_path)
+ .unwrap();
}
diff --git a/contracts/car-races/car-2/src/lib.rs b/contracts/car-races/car-2/src/lib.rs
index af74907d8..587c8998b 100644
--- a/contracts/car-races/car-2/src/lib.rs
+++ b/contracts/car-races/car-2/src/lib.rs
@@ -1,50 +1,14 @@
#![no_std]
-use codec::{Decode, Encode};
-use gstd::{collections::BTreeMap, exec, msg, prelude::*, ActorId};
-#[derive(Encode, Decode, TypeInfo)]
-pub enum CarAction {
- YourTurn(BTreeMap),
-}
-
-#[derive(Encode, Decode, TypeInfo, Clone)]
-pub struct Car {
- pub balance: u32,
- pub position: u32,
- pub speed: u32,
- pub penalty: u8,
-}
-
-#[derive(Encode, Decode, TypeInfo)]
-pub enum StrategyAction {
- BuyAcceleration,
- BuyShell,
- Skip,
-}
-
-#[no_mangle]
-extern fn handle() {
- let random_choice = get_random_value(10);
- match random_choice {
- 0..=2 => {
- msg::reply(StrategyAction::BuyAcceleration, 0).expect("Error in sending a message");
- }
- 3..=9 => {
- msg::reply(StrategyAction::BuyShell, 0).expect("Error in sending a message");
- }
- _ => {
- unreachable!()
- }
- }
-}
+#[cfg(target_arch = "wasm32")]
+pub use car_strategy_app_2::wasm::*;
-static mut SEED: u8 = 0;
+#[cfg(feature = "wasm-binary")]
+#[cfg(not(target_arch = "wasm32"))]
+pub use code::WASM_BINARY_OPT as WASM_BINARY;
-pub fn get_random_value(range: u8) -> u8 {
- let seed = unsafe { SEED };
- unsafe { SEED = SEED.wrapping_add(1) };
- let mut random_input: [u8; 32] = exec::program_id().into();
- random_input[0] = random_input[0].wrapping_add(seed);
- let (random, _) = exec::random(random_input).expect("Error in getting random number");
- random[0] % range
+#[cfg(feature = "wasm-binary")]
+#[cfg(not(target_arch = "wasm32"))]
+mod code {
+ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
}
diff --git a/contracts/car-races/car-3/Cargo.toml b/contracts/car-races/car-3/Cargo.toml
index 4e3302dec..22c46289e 100644
--- a/contracts/car-races/car-3/Cargo.toml
+++ b/contracts/car-races/car-3/Cargo.toml
@@ -1,12 +1,21 @@
-[package]
-name = "car-3"
-version = "0.1.0"
-edition = "2021"
-
-[dependencies]
-gstd = { workspace = true, features = ["debug"] }
-scale-info.workspace = true
-parity-scale-codec.workspace = true
-
-[build-dependencies]
-gear-wasm-builder.workspace = true
+[package]
+name = "car-strategy-3"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+car-strategy-app-3 = { path = "app" }
+
+[build-dependencies]
+car-strategy-app-3 = { path = "app" }
+sails-rs.workspace = true
+sails-idl-gen.workspace = true
+gear-wasm-builder.workspace = true
+
+[dev-dependencies]
+car-strategy-3 = { path = ".", features = ["wasm-binary"] }
+sails-rs.workspace = true
+tokio.workspace = true
+
+[features]
+wasm-binary = []
diff --git a/contracts/car-races/car-3/README.md b/contracts/car-races/car-3/README.md
new file mode 100644
index 000000000..c0cfd5e7a
--- /dev/null
+++ b/contracts/car-races/car-3/README.md
@@ -0,0 +1,9 @@
+## The **car-strategy** program
+
+The program workspace includes the following packages:
+- `car-strategy` is the package allowing to build WASM binary for the program and IDL file for it.
+ The package also includes integration tests for the program in the `tests` sub-folder
+- `car-strategy-app` is the package containing business logic for the program represented by the `CarStrategyService` structure.
+- `car-strategy-client` is the package containing the client for the program allowing to interact with it from another program, tests, or
+ off-chain client.
+
diff --git a/contracts/car-races/car-3/app/Cargo.toml b/contracts/car-races/car-3/app/Cargo.toml
new file mode 100644
index 000000000..cccbcb65d
--- /dev/null
+++ b/contracts/car-races/car-3/app/Cargo.toml
@@ -0,0 +1,10 @@
+[package]
+name = "car-strategy-app-3"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+sails-rs.workspace = true
+gstd.workspace = true
+parity-scale-codec.workspace = true
+scale-info.workspace = true
\ No newline at end of file
diff --git a/contracts/car-races/car-3/app/src/lib.rs b/contracts/car-races/car-3/app/src/lib.rs
new file mode 100644
index 000000000..c00ed3197
--- /dev/null
+++ b/contracts/car-races/car-3/app/src/lib.rs
@@ -0,0 +1,80 @@
+#![no_std]
+#![allow(clippy::new_without_default)]
+
+use sails_rs::{collections::BTreeMap, prelude::*};
+struct CarStrategyService(());
+
+#[sails_rs::service]
+impl CarStrategyService {
+ pub fn new() -> Self {
+ Self(())
+ }
+
+ // this car only accelerates
+ pub fn make_move(&mut self, cars: BTreeMap) -> StrategyAction {
+ let my_car_id = gstd::exec::program_id();
+ let my_car = cars.get(&my_car_id).expect("Unable to get my car");
+ let my_position = my_car.position;
+ let mut cars_vec: Vec<(ActorId, Car)> = cars
+ .iter()
+ .map(|(car_id, car)| (*car_id, car.clone()))
+ .collect();
+ cars_vec.sort_by(|a, b| b.1.position.cmp(&a.1.position));
+ // If I'm the first skip
+ if cars_vec[0].0 == my_car_id {
+ return StrategyAction::Skip;
+ }
+ // if I'm the second
+ if cars_vec[1].0 == my_car_id {
+ // if the distance is small, then just buy acceleration
+ if (cars_vec[0].1.position - my_position) <= 1000 {
+ return StrategyAction::BuyShell;
+ } else {
+ // else buy shells
+ return StrategyAction::BuyAcceleration;
+ }
+ }
+ // if I'm the third just buy shell
+ if cars_vec[2].0 == my_car_id {
+ return StrategyAction::BuyAcceleration;
+ }
+ StrategyAction::Skip
+ }
+}
+
+pub struct CarStrategyProgram(());
+
+#[sails_rs::program]
+impl CarStrategyProgram {
+ // Program's constructor
+ pub fn new() -> Self {
+ Self(())
+ }
+
+ // Exposed service
+ pub fn car_strategy(&self) -> CarStrategyService {
+ CarStrategyService::new()
+ }
+}
+
+#[derive(Encode, Decode, TypeInfo, Clone, Debug)]
+pub struct Car {
+ pub position: u32,
+ pub speed: u32,
+ pub car_actions: Vec,
+ pub round_result: Option,
+}
+
+#[derive(Encode, Decode, TypeInfo, Debug)]
+pub enum StrategyAction {
+ BuyAcceleration,
+ BuyShell,
+ Skip,
+}
+
+#[derive(Encode, Decode, TypeInfo, Debug, Clone, PartialEq, Eq)]
+pub enum RoundAction {
+ Accelerated,
+ SlowedDown,
+ SlowedDownAndAccelerated,
+}
diff --git a/contracts/car-races/car-3/build.rs b/contracts/car-races/car-3/build.rs
index 6836d02c0..eb45bfef9 100644
--- a/contracts/car-races/car-3/build.rs
+++ b/contracts/car-races/car-3/build.rs
@@ -1,3 +1,24 @@
+use std::{
+ env,
+ fs::File,
+ io::{BufRead, BufReader},
+ path::PathBuf,
+};
+
fn main() {
gear_wasm_builder::build();
+
+ if env::var("__GEAR_WASM_BUILDER_NO_BUILD").is_ok() {
+ return;
+ }
+
+ let bin_path_file = File::open(".binpath").unwrap();
+ let mut bin_path_reader = BufReader::new(bin_path_file);
+ let mut bin_path = String::new();
+ bin_path_reader.read_line(&mut bin_path).unwrap();
+
+ let mut idl_path = PathBuf::from(bin_path);
+ idl_path.set_extension("idl");
+ sails_idl_gen::generate_idl_to_file::(idl_path)
+ .unwrap();
}
diff --git a/contracts/car-races/car-3/src/lib.rs b/contracts/car-races/car-3/src/lib.rs
index 9a57af159..25867ee6d 100644
--- a/contracts/car-races/car-3/src/lib.rs
+++ b/contracts/car-races/car-3/src/lib.rs
@@ -1,64 +1,14 @@
#![no_std]
-use codec::{Decode, Encode};
-use gstd::{collections::BTreeMap, exec, msg, prelude::*, ActorId};
-#[derive(Encode, Decode, TypeInfo)]
-pub enum CarAction {
- YourTurn(BTreeMap),
-}
-#[derive(Encode, Decode, TypeInfo, Clone, Debug)]
-pub struct Car {
- pub balance: u32,
- pub position: u32,
- pub speed: u32,
- pub penalty: u8,
- pub car_actions: Vec,
- pub round_result: Option,
-}
+#[cfg(target_arch = "wasm32")]
+pub use car_strategy_app_3::wasm::*;
-#[derive(Encode, Decode, TypeInfo)]
-pub enum StrategyAction {
- BuyAcceleration,
- BuyShell,
- Skip,
-}
-
-#[derive(Encode, Decode, TypeInfo, Debug, Clone)]
-pub enum RoundAction {
- Accelerated(u32),
- SlowedDown(u32),
-}
+#[cfg(feature = "wasm-binary")]
+#[cfg(not(target_arch = "wasm32"))]
+pub use code::WASM_BINARY_OPT as WASM_BINARY;
-#[no_mangle]
-extern fn handle() {
- let msg: CarAction = msg::load().expect("Unable to load the message");
- let CarAction::YourTurn(cars) = msg;
- let my_car_id = exec::program_id();
- let my_car = cars.get(&my_car_id).expect("Unable to get my car");
- let my_position = my_car.position;
- let mut cars_vec: Vec<(ActorId, Car)> = cars
- .iter()
- .map(|(car_id, car)| (*car_id, car.clone()))
- .collect();
- cars_vec.sort_by(|a, b| b.1.position.cmp(&a.1.position));
- // If I'm the first skip
- if cars_vec[0].0 == my_car_id {
- msg::reply(StrategyAction::Skip, 0).expect("Error in sending a message");
- return;
- }
- // if I'm the second
- if cars_vec[1].0 == my_car_id {
- // if the distance is small, then just buy acceleration
- if (cars_vec[0].1.position - my_position) <= 1000 {
- msg::reply(StrategyAction::BuyShell, 0).expect("Error in sending a message");
- } else {
- // else buy shells
- msg::reply(StrategyAction::BuyAcceleration, 0).expect("Error in sending a message");
- }
- return;
- }
- // if I'm the third just buy shell
- if cars_vec[2].0 == my_car_id {
- msg::reply(StrategyAction::BuyAcceleration, 0).expect("Error in sending a message");
- }
+#[cfg(feature = "wasm-binary")]
+#[cfg(not(target_arch = "wasm32"))]
+mod code {
+ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
}
diff --git a/contracts/car-races/io/Cargo.toml b/contracts/car-races/io/Cargo.toml
deleted file mode 100644
index 20f35534c..000000000
--- a/contracts/car-races/io/Cargo.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[package]
-name = "car-races-io"
-version = "0.1.0"
-edition = "2021"
-
-[dependencies]
-gstd = { workspace = true, features = ["debug"] }
-gmeta.workspace = true
-primitive-types.workspace = true
-scale-info.workspace = true
-parity-scale-codec.workspace = true
diff --git a/contracts/car-races/io/src/lib.rs b/contracts/car-races/io/src/lib.rs
deleted file mode 100644
index 2e53e8a8d..000000000
--- a/contracts/car-races/io/src/lib.rs
+++ /dev/null
@@ -1,354 +0,0 @@
-//! Data types for the contract input/output.
-
-#![no_std]
-use codec::{Decode, Encode};
-use gmeta::{In, InOut, Metadata};
-use gstd::{collections::BTreeMap, prelude::*, ActorId, MessageId};
-// prices for acceleration and shuffles are constants for simple implementation
-pub const ACCELERATION_COST: u32 = 10;
-pub const SHELL_COST: u32 = 20;
-
-pub const DEFAULT_ACC_AMOUNT: u32 = 20;
-pub const DEFAULT_SHELL_AMOUNT: u32 = 25;
-
-pub const MAX_ACC_AMOUNT: u32 = 40;
-pub const MAX_SHELL_AMOUNT: u32 = 40;
-pub const MAX_DISTANCE: u32 = 3_242;
-pub const TIME: u32 = 1;
-
-pub const DEFAULT_SPEED: u32 = 100;
-
-pub const GAS_FOR_STRATEGY: u64 = 20_000_000_000;
-pub const GAS_FOR_ROUND: u64 = 150_000_000_000;
-pub const RESERVATION_AMOUNT: u64 = 240_000_000_000;
-pub const RESERVATION_TIME: u32 = 86_400;
-pub const GAS_MIN_AMOUNT: u64 = 30_000_000_000;
-
-/// Time deadline for player turn(30_000ms).
-pub const TURN_DEADLINE_MS: u64 = 30_000;
-
-pub const MIN_SPEED: u32 = 10;
-
-/// Time after which the game instance must be removed
-/// 1 block = 3s (1 minutes)
-pub const TIME_INTERVAL: u32 = 20;
-
-/// Gas for deleting the game instance
-pub const GAS_TO_REMOVE_GAME: u64 = 20_000_000_000;
-
-/// Contract metadata. This is the contract's interface description.
-///
-/// It defines the types of messages that can be sent to the contract.
-pub struct ContractMetadata;
-
-impl Metadata for ContractMetadata {
- /// Init message type.
- ///
- /// Describes incoming/outgoing types for the `init()` function.
- ///
- /// The [`GameInit`] type is passed for initial smart-contract data(i.e config..) if any.
- type Init = In;
- /// Handle message type.
- ///
- /// Describes incoming/outgoing types for the `handle()` function.
- ///
- /// We use the [`GameAction`] type for incoming and [`GameReply`] for outgoing
- /// messages.
- type Handle = InOut>;
- /// Asynchronous handle message type.
- ///
- /// Describes incoming/outgoing types for the `main()` function in case of
- /// asynchronous interaction.
- ///
- /// The unit tuple is used as we don't use asynchronous interaction in this
- /// contract.
- type Others = InOut<(), RoundInfo>;
- /// Reply message type.
- ///
- /// Describes incoming/outgoing types of messages performed using the
- /// `handle_reply()` function.
- ///
- /// The unit tuple is used as we don't process any replies in this contract.
- type Reply = ();
- /// Signal message type.
- ///
- /// Describes only the outgoing type from the program while processing the
- /// system signal.
- ///
- /// The unit tuple is used as we don't process any signals in this contract.
- type Signal = ();
-
- type State = InOut;
-}
-
-#[derive(Encode, Decode, TypeInfo)]
-pub enum StateQuery {
- Admins,
- StrategyIds,
- Game { account_id: ActorId },
- AllGames,
- MsgIdToGameId,
- Config,
- MessagesAllowed,
-}
-
-#[derive(Encode, Decode, TypeInfo)]
-pub enum StateReply {
- Admins(Vec),
- StrategyIds(Vec),
- Game(Option),
- AllGames(Vec<(ActorId, Game)>),
- MsgIdToGameId(Vec<(MessageId, ActorId)>),
- WaitingMsgs(Vec<(MessageId, MessageId)>),
- Config(Config),
- MessagesAllowed(bool),
-}
-
-#[derive(Encode, Decode, TypeInfo, Clone, Debug)]
-pub struct Car {
- pub position: u32,
- pub speed: u32,
- pub car_actions: Vec,
- pub round_result: Option,
-}
-
-#[derive(Encode, Decode, TypeInfo, Default, PartialEq, Eq, Debug, Clone)]
-pub enum GameState {
- #[default]
- ReadyToStart,
- Race,
- Stopped,
- Finished,
- PlayerAction,
-}
-
-#[derive(Encode, Decode, TypeInfo, Default, Clone, Debug)]
-pub struct Game {
- pub cars: BTreeMap,
- pub car_ids: Vec,
- pub current_turn: u8,
- pub state: GameState,
- pub result: Option,
- pub current_round: u32,
- pub last_time_step: u64,
-}
-
-#[derive(Encode, Decode, TypeInfo, Clone, Debug)]
-pub enum GameResult {
- Win,
- Draw,
- Lose,
-}
-
-#[derive(Encode, Decode, TypeInfo)]
-pub struct GameInit {
- pub config: Config,
-}
-
-#[derive(Encode, Decode, TypeInfo)]
-pub enum GameAction {
- AddAdmin(ActorId),
- RemoveAdmin(ActorId),
- AddStrategyIds {
- car_ids: Vec,
- },
- StartGame,
- Play {
- account: ActorId,
- },
- PlayerMove {
- strategy_action: StrategyAction,
- },
- UpdateConfig {
- gas_to_remove_game: Option,
- initial_speed: Option,
- min_speed: Option,
- max_speed: Option,
- gas_for_round: Option,
- time_interval: Option,
- max_distance: Option,
- time: Option,
- time_for_game_storage: Option,
- },
- RemoveGameInstance {
- account_id: ActorId,
- },
- RemoveGameInstances {
- players_ids: Option>,
- },
- AllowMessages(bool),
-}
-
-#[derive(Encode, Decode, TypeInfo, Debug)]
-pub enum StrategyAction {
- BuyAcceleration,
- BuyShell,
- Skip,
-}
-
-#[derive(Encode, Decode, TypeInfo, Debug, Clone, PartialEq, Eq)]
-pub enum RoundAction {
- Accelerated,
- SlowedDown,
- SlowedDownAndAccelerated,
-}
-
-#[derive(Encode, Decode, TypeInfo)]
-pub enum CarAction {
- YourTurn(BTreeMap),
-}
-
-#[derive(Encode, Decode, TypeInfo, PartialEq, Eq)]
-pub enum GameReply {
- GameFinished,
- GameStarted,
- StrategyAdded,
- MoveMade,
- GameInstanceRemoved,
- InstancesRemoved,
- AdminAdded,
- AdminRemoved,
- ConfigUpdated,
- StatusMessagesUpdated,
-}
-
-#[derive(Debug, Clone, Encode, Decode, TypeInfo)]
-pub enum GameError {
- NotAdmin,
- MustBeTwoStrategies,
- GameAlreadyStarted,
- NotPlayerTurn,
- NotProgram,
- MessageProcessingSuspended,
-}
-
-impl Game {
- pub fn buy_acceleration(&mut self) {
- let car_id = self.get_current_car_id();
- let car = self.cars.get_mut(&car_id).expect("Get Car: Can't be None");
- car.speed = car.speed.saturating_add(DEFAULT_SPEED);
- car.car_actions.push(RoundAction::Accelerated);
- }
-
- pub fn buy_shell(&mut self) {
- let car_id = self.get_current_car_id();
-
- let shelled_car_id = self.find_car_to_shell(&car_id);
- self.cars.entry(shelled_car_id).and_modify(|car| {
- let new_speed = car.speed.saturating_sub(DEFAULT_SPEED);
- car.speed = new_speed.max(DEFAULT_SPEED);
- car.car_actions.push(RoundAction::SlowedDown);
- });
- }
-
- pub fn get_current_car_id(&self) -> ActorId {
- self.car_ids[self.current_turn as usize]
- }
-
- pub fn update_positions(&mut self, config: &Config) {
- let mut winners = Vec::with_capacity(3);
- for (car_id, car) in self.cars.iter_mut() {
- car.position = car.position.saturating_add(car.speed * config.time);
- if car.position >= config.max_distance {
- self.state = GameState::Finished;
- winners.push((*car_id, car.position));
- }
-
- if !car.car_actions.is_empty() {
- car.round_result = if car.car_actions.contains(&RoundAction::Accelerated)
- && car.car_actions.contains(&RoundAction::SlowedDown)
- {
- Some(RoundAction::SlowedDownAndAccelerated)
- } else if car.car_actions.contains(&RoundAction::Accelerated) {
- Some(RoundAction::Accelerated)
- } else {
- Some(RoundAction::SlowedDown)
- };
- car.car_actions = Vec::new();
- } else {
- car.round_result = None;
- }
- }
- winners.sort_by(|a, b| b.1.cmp(&a.1));
- if self.state == GameState::Finished {
- match winners.len() {
- 1 => {
- if winners[0].0 == self.car_ids[0] {
- self.result = Some(GameResult::Win);
- } else {
- self.result = Some(GameResult::Lose);
- }
- }
- 2 => {
- if winners[0].0 == self.car_ids[0] || winners[1].0 == self.car_ids[0] {
- if winners[0].1 == winners[1].1 {
- self.result = Some(GameResult::Draw);
- } else if winners[0].0 == self.car_ids[0] {
- self.result = Some(GameResult::Win);
- } else {
- self.result = Some(GameResult::Lose);
- }
- } else {
- self.result = Some(GameResult::Lose);
- }
- }
- 3 => {
- if winners[0].1 == winners[1].1 && winners[0].1 == winners[2].1 {
- self.result = Some(GameResult::Draw);
- } else if winners[0].1 == winners[1].1 {
- if winners[0].0 == self.car_ids[0] || winners[1].0 == self.car_ids[0] {
- self.result = Some(GameResult::Draw);
- } else {
- self.result = Some(GameResult::Lose);
- }
- } else if winners[0].0 == self.car_ids[0] {
- self.result = Some(GameResult::Win);
- } else {
- self.result = Some(GameResult::Lose);
- }
- }
- _ => {
- unreachable!();
- }
- }
- }
- }
-
- fn find_car_to_shell(&self, car_id: &ActorId) -> ActorId {
- let mut cars_vec: Vec<(ActorId, Car)> = self
- .cars
- .iter()
- .map(|(car_id, car)| (*car_id, car.clone()))
- .collect();
- cars_vec.sort_by(|a, b| b.1.position.cmp(&a.1.position));
-
- // if the car is the first
- // then we slowed the car that is behind it
- if cars_vec[0].0 == *car_id {
- return cars_vec[1].0;
- }
-
- // if the car is the second or the last
- // then we slowed the first car
- cars_vec[0].0
- }
-}
-
-#[derive(Debug, Default, Encode, Decode, TypeInfo, Clone)]
-pub struct Config {
- pub gas_to_remove_game: u64,
- pub initial_speed: u32,
- pub min_speed: u32,
- pub max_speed: u32,
- pub gas_for_round: u64,
- pub time_interval: u32,
- pub max_distance: u32,
- pub time: u32,
- pub time_for_game_storage: u64,
-}
-
-#[derive(Debug, Default, Encode, Decode, TypeInfo, Clone)]
-pub struct RoundInfo {
- pub cars: Vec<(ActorId, u32, Option)>,
- pub result: Option,
-}
diff --git a/contracts/car-races/src/lib.rs b/contracts/car-races/src/lib.rs
deleted file mode 100644
index 4684a02a9..000000000
--- a/contracts/car-races/src/lib.rs
+++ /dev/null
@@ -1,473 +0,0 @@
-#![no_std]
-
-use gstd::{
- collections::{BTreeMap, HashMap},
- exec, msg,
- prelude::*,
- ActorId, MessageId,
-};
-static mut CONTRACT: Option = None;
-
-use car_races_io::*;
-
-#[derive(Default)]
-pub struct Contract {
- pub admins: Vec,
- pub strategy_ids: Vec,
- pub games: HashMap,
- pub msg_id_to_game_id: HashMap,
- pub config: Config,
- pub messages_allowed: bool,
-}
-
-impl Contract {
- fn add_strategy_ids(
- &mut self,
- msg_src: &ActorId,
- car_ids: Vec,
- ) -> Result {
- if !self.admins.contains(msg_src) {
- return Err(GameError::NotAdmin);
- }
- if car_ids.len() != 2 {
- return Err(GameError::MustBeTwoStrategies);
- }
- self.strategy_ids = car_ids;
- Ok(GameReply::StrategyAdded)
- }
-
- fn start_game(&mut self, msg_src: &ActorId) -> Result {
- let last_time_step = exec::block_timestamp();
-
- let game = if let Some(game) = self.games.get_mut(msg_src) {
- if game.state != GameState::Finished {
- return Err(GameError::GameAlreadyStarted);
- }
- game.current_round = 0;
- game.result = None;
- game.last_time_step = last_time_step;
- game
- } else {
- self.games.entry(*msg_src).or_insert_with(|| Game {
- last_time_step,
- ..Default::default()
- })
- };
-
- game.car_ids = vec![*msg_src, self.strategy_ids[0], self.strategy_ids[1]];
- let initial_state = Car {
- position: 0,
- speed: self.config.initial_speed,
- car_actions: Vec::new(),
- round_result: None,
- };
-
- game.cars.insert(*msg_src, initial_state.clone());
- game.cars
- .insert(self.strategy_ids[0], initial_state.clone());
- game.cars.insert(self.strategy_ids[1], initial_state);
-
- game.state = GameState::PlayerAction;
- Ok(GameReply::GameStarted)
- }
-
- fn player_move(
- &mut self,
- msg_src: &ActorId,
- strategy_move: StrategyAction,
- ) -> Result {
- let game = self.get_game(msg_src);
-
- if game.state != GameState::PlayerAction {
- return Err(GameError::NotPlayerTurn);
- }
- match strategy_move {
- StrategyAction::BuyAcceleration => {
- game.buy_acceleration();
- }
- StrategyAction::BuyShell => {
- game.buy_shell();
- }
- StrategyAction::Skip => {}
- }
-
- game.state = GameState::Race;
- game.last_time_step = exec::block_timestamp();
- let num_of_cars = game.car_ids.len() as u8;
-
- game.current_turn = (game.current_turn + 1) % num_of_cars;
-
- let car_id = game.get_current_car_id();
-
- let msg_id = msg::send_with_gas(
- car_id,
- CarAction::YourTurn(game.cars.clone()),
- self.config.gas_for_round,
- 0,
- )
- .expect("Error in sending a message");
-
- self.msg_id_to_game_id.insert(msg_id, *msg_src);
- Ok(GameReply::MoveMade)
- }
-
- fn play(&mut self, msg_src: &ActorId, account: &ActorId) -> Result {
- if *msg_src != exec::program_id() {
- return Err(GameError::NotProgram);
- }
-
- let game = self.get_game(account);
-
- if game.state == GameState::Finished {
- let result = game.result.clone();
- let cars = game.cars.clone();
- let car_ids = game.car_ids.clone();
- self.send_messages(account);
- send_message_round_info(&car_ids[0], &cars, &result);
- return Ok(GameReply::GameFinished);
- }
- if game.current_turn == 0 {
- game.state = GameState::PlayerAction;
- let result = game.result.clone();
- let cars = game.cars.clone();
- let car_ids = game.car_ids.clone();
- send_message_round_info(&car_ids[0], &cars, &result);
- return Ok(GameReply::MoveMade);
- }
-
- let car_id = game.get_current_car_id();
-
- let msg_id = msg::send(car_id, CarAction::YourTurn(game.cars.clone()), 0)
- .expect("Error in sending a message");
-
- self.msg_id_to_game_id.insert(msg_id, *account);
- Ok(GameReply::MoveMade)
- }
-
- fn get_game(&mut self, account: &ActorId) -> &mut Game {
- self.games.get_mut(account).expect("Game does not exist")
- }
-
- fn send_messages(&mut self, account: &ActorId) {
- msg::send_with_gas_delayed(
- exec::program_id(),
- GameAction::RemoveGameInstance {
- account_id: *account,
- },
- self.config.gas_to_remove_game,
- 0,
- self.config.time_interval,
- )
- .expect("Error in sending message");
- }
-
- fn remove_game_instance(
- &mut self,
- msg_src: &ActorId,
- account: &ActorId,
- ) -> Result {
- if *msg_src != exec::program_id() {
- return Err(GameError::NotProgram);
- }
- let game = self
- .games
- .get(account)
- .expect("Unexpected: the game does not exist");
-
- if game.state == GameState::Finished {
- self.games.remove(account);
- }
- Ok(GameReply::GameInstanceRemoved)
- }
-
- fn remove_instances(
- &mut self,
- msg_src: &ActorId,
- player_ids: Option>,
- ) -> Result {
- if !self.admins.contains(msg_src) {
- return Err(GameError::NotAdmin);
- }
- match player_ids {
- Some(player_ids) => {
- for player_id in player_ids {
- self.games.remove(&player_id);
- }
- }
- None => {
- self.games.retain(|_, game| {
- (exec::block_timestamp() - game.last_time_step)
- < self.config.time_for_game_storage
- });
- }
- }
- Ok(GameReply::InstancesRemoved)
- }
- fn add_admin(&mut self, msg_src: &ActorId, admin: ActorId) -> Result {
- if !self.admins.contains(msg_src) {
- return Err(GameError::NotAdmin);
- }
- self.admins.push(admin);
- Ok(GameReply::AdminAdded)
- }
- fn remove_admin(&mut self, msg_src: &ActorId, admin: ActorId) -> Result {
- if !self.admins.contains(msg_src) {
- return Err(GameError::NotAdmin);
- }
- self.admins.retain(|id| *id != admin);
- Ok(GameReply::AdminRemoved)
- }
- #[allow(clippy::too_many_arguments)]
- fn update_config(
- &mut self,
- msg_src: &ActorId,
- gas_to_remove_game: Option,
- initial_speed: Option,
- min_speed: Option,
- max_speed: Option,
- gas_for_round: Option,
- time_interval: Option,
- max_distance: Option,
- time: Option,
- time_for_game_storage: Option,
- ) -> Result {
- if !self.admins.contains(msg_src) {
- return Err(GameError::NotAdmin);
- }
-
- if let Some(gas_to_remove_game) = gas_to_remove_game {
- self.config.gas_to_remove_game = gas_to_remove_game;
- }
- if let Some(initial_speed) = initial_speed {
- self.config.initial_speed = initial_speed;
- }
-
- if let Some(min_speed) = min_speed {
- self.config.min_speed = min_speed;
- }
-
- if let Some(max_speed) = max_speed {
- self.config.max_speed = max_speed;
- }
-
- if let Some(gas_for_round) = gas_for_round {
- self.config.gas_for_round = gas_for_round;
- }
- if let Some(time_interval) = time_interval {
- self.config.time_interval = time_interval;
- }
-
- if let Some(max_distance) = max_distance {
- self.config.max_distance = max_distance;
- }
-
- if let Some(max_speed) = max_speed {
- self.config.max_speed = max_speed;
- }
-
- if let Some(time) = time {
- self.config.time = time;
- }
- if let Some(time_for_game_storage) = time_for_game_storage {
- self.config.time_for_game_storage = time_for_game_storage;
- }
- Ok(GameReply::ConfigUpdated)
- }
- fn allow_messages(
- &mut self,
- msg_src: &ActorId,
- messages_allowed: bool,
- ) -> Result {
- if !self.admins.contains(msg_src) {
- return Err(GameError::NotAdmin);
- }
- self.messages_allowed = messages_allowed;
- Ok(GameReply::StatusMessagesUpdated)
- }
-}
-
-#[no_mangle]
-extern fn handle() {
- let action: GameAction = msg::load().expect("Unable to decode the message");
- let contract = unsafe { CONTRACT.as_mut().expect("The game is not initialized") };
- let msg_src = msg::source();
-
- if !contract.messages_allowed && !contract.admins.contains(&msg_src) {
- msg::reply(
- Err::(GameError::MessageProcessingSuspended),
- 0,
- )
- .expect("Failed to encode or reply with `Result`.");
- return;
- }
-
- let reply = match action {
- GameAction::AddStrategyIds { car_ids } => contract.add_strategy_ids(&msg_src, car_ids),
- GameAction::StartGame => contract.start_game(&msg_src),
- GameAction::Play { account } => contract.play(&msg_src, &account),
- GameAction::PlayerMove { strategy_action } => {
- contract.player_move(&msg_src, strategy_action)
- }
- GameAction::RemoveGameInstance { account_id } => {
- contract.remove_game_instance(&msg_src, &account_id)
- }
- GameAction::RemoveGameInstances { players_ids } => {
- contract.remove_instances(&msg_src, players_ids)
- }
- GameAction::AddAdmin(admin) => contract.add_admin(&msg_src, admin),
- GameAction::RemoveAdmin(admin) => contract.remove_admin(&msg_src, admin),
- GameAction::UpdateConfig {
- gas_to_remove_game,
- initial_speed,
- min_speed,
- max_speed,
- gas_for_round,
- time_interval,
- max_distance,
- time,
- time_for_game_storage,
- } => contract.update_config(
- &msg_src,
- gas_to_remove_game,
- initial_speed,
- min_speed,
- max_speed,
- gas_for_round,
- time_interval,
- max_distance,
- time,
- time_for_game_storage,
- ),
- GameAction::AllowMessages(messages_allowed) => {
- contract.allow_messages(&msg_src, messages_allowed)
- }
- };
- msg::reply(reply, 0).expect("Failed to encode or reply with `Result`.");
-}
-
-#[no_mangle]
-extern fn handle_reply() {
- let reply_to = msg::reply_to().expect("Unable to get the msg id");
- let contract = unsafe { CONTRACT.as_mut().expect("The game is not initialized") };
-
- let game_id = contract
- .msg_id_to_game_id
- .remove(&reply_to)
- .expect("Unexpected reply");
-
- let game = contract
- .games
- .get_mut(&game_id)
- .expect("Unexpected: Game does not exist");
-
- let bytes = msg::load_bytes().expect("Unable to load bytes");
- // car eliminated from race for wrong payload
- if let Ok(strategy) = StrategyAction::decode(&mut &bytes[..]) {
- match strategy {
- StrategyAction::BuyAcceleration => {
- game.buy_acceleration();
- }
- StrategyAction::BuyShell => {
- game.buy_shell();
- }
- StrategyAction::Skip => {}
- }
- } else {
- // car eliminated from race for wrong payload
- let current_car_id = game.get_current_car_id();
- game.car_ids.retain(|car_id| *car_id != current_car_id);
- }
- let num_of_cars = game.car_ids.len() as u8;
-
- game.current_turn = (game.current_turn + 1) % num_of_cars;
-
- // if one round is made, then we update the positions of the cars
- // and send a message about the new position of the fields
- if game.current_turn == 0 {
- game.current_round = game.current_round.saturating_add(1);
- game.update_positions(&contract.config);
- }
-
- msg::send(exec::program_id(), GameAction::Play { account: game_id }, 0)
- .expect("Error in sending a msg");
-}
-
-#[no_mangle]
-extern fn init() {
- let init_msg: GameInit = msg::load().expect("Unable to load the message");
-
- unsafe {
- CONTRACT = Some(Contract {
- admins: vec![msg::source()],
- config: init_msg.config,
- games: HashMap::with_capacity(20_000),
- msg_id_to_game_id: HashMap::with_capacity(5_000),
- ..Default::default()
- });
- }
-}
-
-#[no_mangle]
-extern fn state() {
- let Contract {
- admins,
- strategy_ids,
- games,
- msg_id_to_game_id,
- config,
- messages_allowed,
- } = unsafe { CONTRACT.take().expect("Failed to get state") };
- let query: StateQuery = msg::load().expect("Unable to load the state query");
-
- match query {
- StateQuery::Admins => {
- msg::reply(StateReply::Admins(admins), 0).expect("Unable to share the state");
- }
- StateQuery::StrategyIds => {
- msg::reply(StateReply::StrategyIds(strategy_ids), 0)
- .expect("Unable to share the state");
- }
- StateQuery::Game { account_id } => {
- let game = games.get(&account_id).cloned();
- msg::reply(StateReply::Game(game), 0).expect("Unable to share the state");
- }
- StateQuery::AllGames => {
- msg::reply(StateReply::AllGames(games.into_iter().collect()), 0)
- .expect("Unable to share the state");
- }
- StateQuery::MsgIdToGameId => {
- msg::reply(
- StateReply::MsgIdToGameId(msg_id_to_game_id.into_iter().collect()),
- 0,
- )
- .expect("Unable to share the state");
- }
- StateQuery::Config => {
- msg::reply(StateReply::Config(config), 0).expect("Unable to share the state");
- }
- StateQuery::MessagesAllowed => {
- msg::reply(StateReply::MessagesAllowed(messages_allowed), 0)
- .expect("Unable to share the state");
- }
- }
-}
-
-fn send_message_round_info(
- account: &ActorId,
- cars_info: &BTreeMap,
- result: &Option,
-) {
- let mut cars = Vec::new();
- for (car_id, info) in cars_info.iter() {
- cars.push((*car_id, info.position, info.round_result.clone()));
- }
- msg::send(
- *account,
- RoundInfo {
- cars,
- result: result.clone(),
- },
- 0,
- )
- .expect("Unable to send the message about round info");
-}
diff --git a/contracts/car-races/tests/test.rs b/contracts/car-races/tests/test.rs
deleted file mode 100644
index df707202d..000000000
--- a/contracts/car-races/tests/test.rs
+++ /dev/null
@@ -1,242 +0,0 @@
-use car_races_io::*;
-use gstd::{prelude::*, ActorId};
-use gtest::{Program, System};
-const ADMIN: u64 = 100;
-pub const PLAYERS: [u64; 3] = [10, 11, 12];
-
-#[test]
-fn success_run_game() {
- let system = System::new();
-
- system.init_logger();
-
- let game = Program::current(&system);
- let game_init_result = game.send(
- ADMIN,
- GameInit {
- config: Config {
- gas_to_remove_game: 20_000_000_000,
- initial_speed: 100,
- min_speed: 10,
- max_speed: 2_000,
- gas_for_round: 100_000_000_000,
- time_interval: 20,
- max_distance: 3_242,
- time: 1,
- time_for_game_storage: 200,
- },
- },
- );
- assert!(!game_init_result.main_failed());
- let car_1 = Program::from_file(
- &system,
- "../target/wasm32-unknown-unknown/release/car_1.opt.wasm",
- );
- let car_init_result = car_1.send_bytes(ADMIN, []);
- assert!(!car_init_result.main_failed());
- let car_2 = Program::from_file(
- &system,
- "../target/wasm32-unknown-unknown/release/car_3.opt.wasm",
- );
- let car_init_result = car_2.send_bytes(ADMIN, []);
- assert!(!car_init_result.main_failed());
- let car_3 = Program::from_file(
- &system,
- "../target/wasm32-unknown-unknown/release/car_3.opt.wasm",
- );
- let car_init_result = car_3.send_bytes(ADMIN, []);
- assert!(!car_init_result.main_failed());
-
- let run_result = game.send(ADMIN, GameAction::AllowMessages(true));
- assert!(!run_result.main_failed());
-
- // Add algorithm
- let car_ids: Vec = vec![2.into(), 3.into()];
- let run_result = game.send(ADMIN, GameAction::AddStrategyIds { car_ids });
- assert!(!run_result.main_failed());
-
- let run_result = game.send(ADMIN, GameAction::StartGame);
-
- assert!(!run_result.main_failed());
-
- for _i in 0..40 {
- let run_result = game.send(
- ADMIN,
- GameAction::PlayerMove {
- strategy_action: StrategyAction::BuyShell,
- },
- );
-
- assert!(!run_result.main_failed());
-
- let reply = game
- .read_state(StateQuery::AllGames)
- .expect("Unexpected invalid state.");
- if let StateReply::AllGames(state) = reply {
- let (_id, game) = &state[0];
- if game.state == GameState::Finished {
- break;
- }
- }
- }
-}
-
-#[test]
-fn success_add_admin() {
- let system = System::new();
-
- system.init_logger();
-
- let game = Program::current(&system);
- let game_init_result = game.send(
- ADMIN,
- GameInit {
- config: Config {
- gas_to_remove_game: 20_000_000_000,
- initial_speed: 100,
- min_speed: 10,
- max_speed: 2_000,
- gas_for_round: 100_000_000_000,
- time_interval: 20,
- max_distance: 3_242,
- time: 1,
- time_for_game_storage: 200,
- },
- },
- );
- assert!(!game_init_result.main_failed());
-
- let run_result = game.send(ADMIN, GameAction::AllowMessages(true));
- assert!(!run_result.main_failed());
-
- let run_result = game.send(ADMIN, GameAction::AddAdmin(1.into()));
- assert!(!run_result.main_failed());
-
- let reply = game
- .read_state(StateQuery::Admins)
- .expect("Unexpected invalid state.");
- if let StateReply::Admins(admins) = reply {
- let true_admins: Vec = vec![100.into(), 1.into()];
- assert_eq!(true_admins, admins, "Wrong admins");
- }
-}
-
-#[test]
-fn failures_test() {
- let system = System::new();
-
- system.init_logger();
-
- let game = Program::current(&system);
- let game_init_result = game.send(
- ADMIN,
- GameInit {
- config: Config {
- gas_to_remove_game: 20_000_000_000,
- initial_speed: 100,
- min_speed: 10,
- max_speed: 2_000,
- gas_for_round: 100_000_000_000,
- time_interval: 20,
- max_distance: 3_242,
- time: 1,
- time_for_game_storage: 200,
- },
- },
- );
- assert!(!game_init_result.main_failed());
-
- // AllowMessages not true
- let run_result = game.send(PLAYERS[0], GameAction::StartGame);
- assert!(!run_result.main_failed());
- assert!(run_result.contains(&(
- PLAYERS[0],
- Err::(GameError::MessageProcessingSuspended).encode()
- )));
-
- let run_result = game.send(ADMIN, GameAction::AllowMessages(true));
- assert!(!run_result.main_failed());
- // not admin
- let run_result = game.send(PLAYERS[0], GameAction::AddAdmin(2.into()));
- assert!(!run_result.main_failed());
- assert!(run_result.contains(&(
- PLAYERS[0],
- Err::(GameError::NotAdmin).encode()
- )));
-
- let car_1 = Program::from_file(
- &system,
- "../target/wasm32-unknown-unknown/release/car_1.opt.wasm",
- );
- let car_init_result = car_1.send_bytes(ADMIN, []);
- assert!(!car_init_result.main_failed());
- let car_2 = Program::from_file(
- &system,
- "../target/wasm32-unknown-unknown/release/car_3.opt.wasm",
- );
- let car_init_result = car_2.send_bytes(ADMIN, []);
- assert!(!car_init_result.main_failed());
- let car_3 = Program::from_file(
- &system,
- "../target/wasm32-unknown-unknown/release/car_3.opt.wasm",
- );
- let car_init_result = car_3.send_bytes(ADMIN, []);
- assert!(!car_init_result.main_failed());
-
- // There must be 2 strategies of cars
- let car_ids: Vec = vec![1.into(), 2.into(), 3.into()];
- let run_result = game.send(ADMIN, GameAction::AddStrategyIds { car_ids });
- assert!(!run_result.main_failed());
- assert!(run_result.contains(&(
- ADMIN,
- Err::(GameError::MustBeTwoStrategies).encode()
- )));
-
- let car_ids: Vec = vec![2.into(), 3.into()];
- let run_result = game.send(ADMIN, GameAction::AddStrategyIds { car_ids });
- assert!(!run_result.main_failed());
-
- let run_result = game.send(ADMIN, GameAction::StartGame);
- assert!(!run_result.main_failed());
- // The game has already started
- let run_result = game.send(ADMIN, GameAction::StartGame);
- assert!(!run_result.main_failed());
- assert!(run_result.contains(&(
- ADMIN,
- Err::(GameError::GameAlreadyStarted).encode()
- )));
-
- for _i in 0..40 {
- let run_result = game.send(
- ADMIN,
- GameAction::PlayerMove {
- strategy_action: StrategyAction::BuyShell,
- },
- );
-
- assert!(!run_result.main_failed());
-
- let reply = game
- .read_state(StateQuery::AllGames)
- .expect("Unexpected invalid state.");
- if let StateReply::AllGames(state) = reply {
- let (_id, game) = &state[0];
- if game.state == GameState::Finished {
- break;
- }
- }
- }
-
- // The game's already over
- let run_result = game.send(
- ADMIN,
- GameAction::PlayerMove {
- strategy_action: StrategyAction::BuyShell,
- },
- );
- assert!(!run_result.main_failed());
- assert!(run_result.contains(&(
- ADMIN,
- Err::(GameError::NotPlayerTurn).encode()
- )));
-}
diff --git a/contracts/car-races/tests/test_node.rs b/contracts/car-races/tests/test_node.rs
deleted file mode 100644
index e7b0f923f..000000000
--- a/contracts/car-races/tests/test_node.rs
+++ /dev/null
@@ -1,155 +0,0 @@
-use car_races_io::*;
-use gclient::{EventListener, EventProcessor, GearApi, Result};
-use gstd::{ActorId, Encode};
-
-async fn upload_program(
- client: &GearApi,
- listener: &mut EventListener,
- path: &str,
- payload: impl Encode,
-) -> Result<[u8; 32]> {
- let (message_id, program_id) =
- common_upload_program(client, gclient::code_from_os(path)?, payload).await?;
-
- assert!(listener
- .message_processed(message_id.into())
- .await?
- .succeed());
-
- Ok(program_id)
-}
-async fn common_upload_program(
- client: &GearApi,
- code: Vec,
- payload: impl Encode,
-) -> Result<([u8; 32], [u8; 32])> {
- let encoded_payload = payload.encode();
- let gas_limit = client
- .calculate_upload_gas(None, code.clone(), encoded_payload, 0, true)
- .await?
- .min_limit;
- let (message_id, program_id, _) = client
- .upload_program(
- code,
- gclient::now_micros().to_le_bytes(),
- payload,
- gas_limit,
- 0,
- )
- .await?;
-
- Ok((message_id.into(), program_id.into()))
-}
-
-#[tokio::test]
-async fn gclient_start_game_test() -> Result<()> {
- let api = GearApi::dev_from_path("../target/tmp/gear").await?;
-
- let mut listener = api.subscribe().await?; // Subscribing for events.
- // Checking that blocks still running.
- assert!(listener.blocks_running().await?);
-
- let init_game = GameInit {
- config: Config {
- gas_to_remove_game: 20_000_000_000,
- initial_speed: 100,
- min_speed: 10,
- max_speed: 2_000,
- gas_for_round: 100_000_000_000,
- time_interval: 20,
- max_distance: 3_242,
- time: 1,
- time_for_game_storage: 200,
- },
- }
- .encode();
-
- let path = "../target/wasm32-unknown-unknown/release/car_races.opt.wasm";
-
- let gas_info = api
- .calculate_upload_gas(
- None,
- gclient::code_from_os(path)?,
- init_game.clone(),
- 0,
- true,
- )
- .await?;
-
- let (message_id, program_id, _hash) = api
- .upload_program_bytes(
- gclient::code_from_os(path)?,
- gclient::now_micros().to_le_bytes(),
- init_game,
- gas_info.min_limit,
- 0,
- )
- .await?;
-
- assert!(listener.message_processed(message_id).await?.succeed());
-
- let allow_messages_payload = GameAction::AllowMessages(true);
-
- let gas_info = api
- .calculate_handle_gas(None, program_id, allow_messages_payload.encode(), 0, true)
- .await?;
- let (message_id, _) = api
- .send_message(program_id, allow_messages_payload, gas_info.min_limit, 0)
- .await?;
- assert!(listener.message_processed(message_id).await?.succeed());
- assert!(listener.blocks_running().await?);
-
- let car_1_id = upload_program(
- &api,
- &mut listener,
- "../target/wasm32-unknown-unknown/release/car_3.opt.wasm",
- 0,
- )
- .await?;
-
- let car_2_id = upload_program(
- &api,
- &mut listener,
- "../target/wasm32-unknown-unknown/release/car_3.opt.wasm",
- 0,
- )
- .await?;
-
- let car_ids: Vec = vec![car_1_id.into(), car_2_id.into()];
- let add_strategy_payload = GameAction::AddStrategyIds { car_ids };
-
- let gas_info = api
- .calculate_handle_gas(None, program_id, add_strategy_payload.encode(), 0, true)
- .await?;
- let (message_id, _) = api
- .send_message(program_id, add_strategy_payload, gas_info.min_limit, 0)
- .await?;
- assert!(listener.message_processed(message_id).await?.succeed());
- assert!(listener.blocks_running().await?);
-
- let start_game_payload = GameAction::StartGame;
-
- let gas_info = api
- .calculate_handle_gas(None, program_id, start_game_payload.encode(), 0, true)
- .await?;
- let (message_id, _) = api
- .send_message(program_id, start_game_payload, gas_info.min_limit, 0)
- .await?;
- assert!(listener.message_processed(message_id).await?.succeed());
- assert!(listener.blocks_running().await?);
-
- let move_payload = GameAction::PlayerMove {
- strategy_action: StrategyAction::BuyShell,
- };
-
- let gas_info = api
- .calculate_handle_gas(None, program_id, move_payload.encode(), 0, true)
- .await?;
- let (message_id, _) = api
- .send_message(program_id, move_payload, gas_info.min_limit, 0)
- .await?;
- assert!(listener.message_processed(message_id).await?.succeed());
- assert!(listener.blocks_running().await?);
-
- Ok(())
-}
diff --git a/contracts/car-races/wasm/Cargo.toml b/contracts/car-races/wasm/Cargo.toml
new file mode 100644
index 000000000..f9565196d
--- /dev/null
+++ b/contracts/car-races/wasm/Cargo.toml
@@ -0,0 +1,19 @@
+[package]
+name = "car-races"
+version.workspace = true
+edition.workspace = true
+license.workspace = true
+
+[dependencies]
+car-races-app = { path = "../app" }
+sails-rs.workspace = true
+
+[build-dependencies]
+gear-wasm-builder.workspace = true
+sails-idl-gen.workspace = true
+sails-client-gen.workspace = true
+car-races-app = { path = "../app" }
+
+[lib]
+crate-type = ["rlib"]
+name = "car_races"
diff --git a/contracts/car-races/wasm/build.rs b/contracts/car-races/wasm/build.rs
new file mode 100644
index 000000000..fb81af1f0
--- /dev/null
+++ b/contracts/car-races/wasm/build.rs
@@ -0,0 +1,15 @@
+use car_races_app::Program;
+use sails_idl_gen::program;
+use std::{env, fs::File, path::PathBuf};
+
+fn main() {
+ gear_wasm_builder::build();
+
+ let manifest_dir_path = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
+
+ let idl_file_path = manifest_dir_path.join("car-races.idl");
+
+ let idl_file = File::create(idl_file_path.clone()).unwrap();
+
+ program::generate_idl::(idl_file).unwrap();
+}
diff --git a/contracts/car-races/wasm/car-races.idl b/contracts/car-races/wasm/car-races.idl
new file mode 100644
index 000000000..db6287ce7
--- /dev/null
+++ b/contracts/car-races/wasm/car-races.idl
@@ -0,0 +1,134 @@
+type InitConfig = struct {
+ config: ServicesConfig,
+};
+
+type ServicesConfig = struct {
+ gas_to_remove_game: u64,
+ initial_speed: u32,
+ min_speed: u32,
+ max_speed: u32,
+ gas_for_round: u64,
+ time_interval: u32,
+ max_distance: u32,
+ time: u32,
+ time_for_game_storage: u64,
+ block_duration_ms: u64,
+ gas_for_reply_deposit: u64,
+};
+
+type SessionConfig = struct {
+ gas_to_delete_session: u64,
+ minimum_session_duration_ms: u64,
+ ms_per_block: u64,
+};
+
+type StrategyAction = enum {
+ BuyAcceleration,
+ BuyShell,
+ Skip,
+};
+
+type Game = struct {
+ cars: map (actor_id, Car),
+ car_ids: vec actor_id,
+ current_turn: u8,
+ state: GameState,
+ result: opt GameResult,
+ current_round: u32,
+ last_time_step: u64,
+};
+
+type Car = struct {
+ position: u32,
+ speed: u32,
+ car_actions: vec RoundAction,
+ round_result: opt RoundAction,
+};
+
+type RoundAction = enum {
+ Accelerated,
+ SlowedDown,
+ SlowedDownAndAccelerated,
+};
+
+type GameState = enum {
+ ReadyToStart,
+ Race,
+ Stopped,
+ Finished,
+ PlayerAction,
+};
+
+type GameResult = enum {
+ Win,
+ Draw,
+ Lose,
+};
+
+type RoundInfo = struct {
+ cars: vec struct { actor_id, u32, opt RoundAction },
+ result: opt GameResult,
+};
+
+type SignatureData = struct {
+ key: actor_id,
+ duration: u64,
+ allowed_actions: vec ActionsForSession,
+};
+
+type ActionsForSession = enum {
+ StartGame,
+ Move,
+ Skip,
+};
+
+type SessionData = struct {
+ key: actor_id,
+ expires: u64,
+ allowed_actions: vec ActionsForSession,
+ expires_at_block: u32,
+};
+
+constructor {
+ New : (init_config: InitConfig, session_config: SessionConfig, dns_id_and_name: opt struct { actor_id, str });
+};
+
+service CarRacesService {
+ AddAdmin : (admin: actor_id) -> null;
+ AddStrategyIds : (car_ids: vec actor_id) -> null;
+ AllowMessages : (messages_allowed: bool) -> null;
+ Kill : (inheritor: actor_id) -> null;
+ PlayerMove : (strategy_move: StrategyAction, session_for_account: opt actor_id) -> null;
+ RemoveAdmin : (admin: actor_id) -> null;
+ RemoveGameInstance : (account: actor_id) -> null;
+ RemoveInstances : (player_ids: opt vec actor_id) -> null;
+ StartGame : (session_for_account: opt actor_id) -> null;
+ UpdateConfig : (config: ServicesConfig) -> null;
+ query Admins : () -> vec actor_id;
+ query AllGames : () -> vec struct { actor_id, Game };
+ query ConfigState : () -> ServicesConfig;
+ query DnsInfo : () -> opt struct { actor_id, str };
+ query Game : (account_id: actor_id) -> opt Game;
+ query MessagesAllowed : () -> bool;
+ query StrategyIds : () -> vec actor_id;
+
+ events {
+ RoundInfo: RoundInfo;
+ GameFinished: struct { player: actor_id };
+ Killed: struct { inheritor: actor_id };
+ }
+};
+
+service Session {
+ CreateSession : (signature_data: SignatureData, signature: opt vec u8) -> null;
+ DeleteSessionFromAccount : () -> null;
+ DeleteSessionFromProgram : (session_for_account: actor_id) -> null;
+ query SessionForTheAccount : (account: actor_id) -> opt SessionData;
+ query Sessions : () -> vec struct { actor_id, SessionData };
+
+ events {
+ SessionCreated;
+ SessionDeleted;
+ }
+};
+
diff --git a/contracts/car-races/wasm/src/lib.rs b/contracts/car-races/wasm/src/lib.rs
new file mode 100644
index 000000000..86d18862d
--- /dev/null
+++ b/contracts/car-races/wasm/src/lib.rs
@@ -0,0 +1,5 @@
+#![no_std]
+include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
+
+#[cfg(target_arch = "wasm32")]
+pub use car_races_app::wasm::*;
diff --git a/contracts/concert/Cargo.toml b/contracts/concert/Cargo.toml
deleted file mode 100644
index a88a44cae..000000000
--- a/contracts/concert/Cargo.toml
+++ /dev/null
@@ -1,24 +0,0 @@
-[package]
-name = "concert"
-version.workspace = true
-edition.workspace = true
-publish.workspace = true
-
-[dependencies]
-gstd.workspace = true
-multi-token-io.workspace = true
-concert-io.workspace = true
-
-[dev-dependencies]
-gstd.workspace = true
-gtest.workspace = true
-gclient.workspace = true
-tokio.workspace = true
-
-# External binaries
-
-multi-token.workspace = true
-
-[build-dependencies]
-concert-io.workspace = true
-gear-wasm-builder.workspace = true
diff --git a/contracts/concert/README.md b/contracts/concert/README.md
index 6c4c7506b..4eb83e150 100644
--- a/contracts/concert/README.md
+++ b/contracts/concert/README.md
@@ -1,24 +1,13 @@
-[![Open in Gitpod](https://img.shields.io/badge/Open_in-Gitpod-white?logo=gitpod)](https://gitpod.io/#FOLDER=concert/https://github.com/gear-foundation/dapps)
-[![Docs](https://img.shields.io/github/actions/workflow/status/gear-foundation/dapps/contracts.yml?logo=rust&label=docs)](https://dapps.gear.rs/concert_io)
-
-# [Concert](https://wiki.gear-tech.io/docs/examples/NFTs/concert)
+# Sails Concert
### 🏗️ Building
```sh
-cargo b -p "concert*"
+cargo b -r -p "concert"
```
### ✅ Testing
-Run all tests, except `gclient` ones:
-```sh
-cargo t -p "concert*" -- --skip gclient
-```
-
-Run all tests:
```sh
-# Download the node binary.
-cargo xtask node
-cargo t -p "concert*"
+cargo t -r -p "concert-app"
```
diff --git a/contracts/concert/app/Cargo.toml b/contracts/concert/app/Cargo.toml
new file mode 100644
index 000000000..b3f8cd8a0
--- /dev/null
+++ b/contracts/concert/app/Cargo.toml
@@ -0,0 +1,17 @@
+[package]
+name = "concert-app"
+version.workspace = true
+edition.workspace = true
+license.workspace = true
+
+[dependencies]
+gstd = { workspace = true, features = ["debug"] }
+sails-rs = { workspace = true, features = ["gtest"] }
+extended-vmt-client.workspace = true
+
+[dev-dependencies]
+gclient.workspace = true
+concert = { path = "../wasm" }
+tokio = "1"
+extended-vmt = { git = "https://github.com/gear-foundation/standards/"}
+
diff --git a/contracts/concert/app/src/lib.rs b/contracts/concert/app/src/lib.rs
new file mode 100644
index 000000000..61ab4da12
--- /dev/null
+++ b/contracts/concert/app/src/lib.rs
@@ -0,0 +1,342 @@
+#![no_std]
+
+use core::fmt::Debug;
+use extended_vmt_client::vmt::io as vmt_io;
+use extended_vmt_client::TokenMetadata as TokenMetadataVmt;
+use gstd::{ext, format};
+use sails_rs::gstd::msg;
+use sails_rs::{
+ calls::ActionIo,
+ collections::{HashMap, HashSet},
+ prelude::*,
+};
+
+const ZERO_ID: ActorId = ActorId::zero();
+const NFT_COUNT: U256 = U256::one();
+
+#[derive(Default, Clone)]
+pub struct Storage {
+ owner_id: ActorId,
+ contract_id: ActorId,
+ name: String,
+ description: String,
+ ticket_ft_id: U256,
+ creator: ActorId,
+ number_of_tickets: U256,
+ tickets_left: U256,
+ date: u128,
+ buyers: HashSet,
+ id_counter: U256,
+ concert_id: U256,
+ running: bool,
+ metadata: HashMap>>,
+ token_id: U256,
+}
+
+#[derive(Debug, Default, Clone, Encode, Decode, TypeInfo, PartialEq, Eq)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub struct TokenMetadata {
+ pub title: Option,
+ pub description: Option,
+ pub media: Option,
+ pub reference: Option,
+}
+
+static mut STORAGE: Option = None;
+
+#[derive(Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq)]
+#[codec(crate = sails_rs::scale_codec)]
+#[scale_info(crate = sails_rs::scale_info)]
+pub enum Event {
+ Creation {
+ creator: ActorId,
+ concert_id: U256,
+ number_of_tickets: U256,
+ date: u128,
+ },
+ Hold {
+ concert_id: U256,
+ },
+ Purchase {
+ concert_id: U256,
+ amount: U256,
+ },
+}
+
+#[derive(Debug)]
+pub enum ConcertError {
+ AlreadyRegistered,
+ ZeroAddress,
+ LessThanOneTicket,
+ NotEnoughTickets,
+ NotEnoughMetadata,
+ NotCreator,
+}
+
+struct ConcertService(());
+
+impl ConcertService {
+ pub fn init(owner_id: ActorId, vmt_contract: ActorId) -> Self {
+ let storage = Storage {
+ owner_id,
+ contract_id: vmt_contract,
+ ..Default::default()
+ };
+ unsafe { STORAGE = Some(storage) };
+ Self(())
+ }
+ pub fn get_mut(&mut self) -> &'static mut Storage {
+ unsafe { STORAGE.as_mut().expect("Storage is not initialized") }
+ }
+ pub fn get(&self) -> &'static Storage {
+ unsafe { STORAGE.as_ref().expect("Storage is not initialized") }
+ }
+}
+
+#[service(events = Event)]
+impl ConcertService {
+ pub fn new() -> Self {
+ Self(())
+ }
+ pub fn create(
+ &mut self,
+ creator: ActorId,
+ name: String,
+ description: String,
+ number_of_tickets: U256,
+ date: u128,
+ token_id: U256,
+ ) {
+ let storage = self.get_mut();
+ if storage.running {
+ panic(ConcertError::AlreadyRegistered);
+ }
+ storage.creator = creator;
+ storage.concert_id = storage.id_counter;
+ storage.ticket_ft_id = storage.concert_id;
+ storage.name = name;
+ storage.description = description;
+ storage.number_of_tickets = number_of_tickets;
+ storage.date = date;
+ storage.running = true;
+ storage.tickets_left = number_of_tickets;
+ storage.token_id = token_id;
+
+ self.notify_on(Event::Creation {
+ creator,
+ concert_id: storage.concert_id,
+ number_of_tickets,
+ date,
+ })
+ .expect("Notification Error");
+ }
+
+ pub async fn hold_concert(&mut self) {
+ let storage = self.get_mut();
+ let msg_src = msg::source();
+ if msg_src != storage.creator {
+ panic(ConcertError::NotCreator);
+ }
+ // get balances from a contract
+ let accounts: Vec<_> = storage.buyers.clone().into_iter().collect();
+ let tokens: Vec