From 24503a4617469b87a4767608298a96c237287959 Mon Sep 17 00:00:00 2001 From: Igor Papandinas Date: Fri, 29 Mar 2024 23:53:37 +0400 Subject: [PATCH] 4.0.0 --- .devcontainer/devcontainer.json | 2 +- README.md | 58 ++++++++++++++++----------------- base-image/Dockerfile | 2 +- package.json | 2 +- src/lib/consts.ts | 2 +- src/lib/nodeInfo.ts | 20 ++++++++++++ 6 files changed, 53 insertions(+), 33 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 19122656..5d8ff2d6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "swanky-env", - "image": "ghcr.io/inkdevhub/swanky-cli/swanky-base:swanky3.1.0-beta.0_v2.1.1", + "image": "ghcr.io/inkdevhub/swanky-cli/swanky-base:swanky4.0.0-beta.0_v2.2.0", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2.8.0": {} }, diff --git a/README.md b/README.md index 4bc281dd..252807fe 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ $ npm install -g @astar-network/swanky-cli $ swanky COMMAND running command... $ swanky (--version|-V|-v) -@astar-network/swanky-cli/4.0.0-beta.0 darwin-x64 node-v21.7.1 +@astar-network/swanky-cli/4.0.0 darwin-x64 node-v21.7.1 $ swanky --help [COMMAND] USAGE $ swanky COMMAND @@ -300,7 +300,7 @@ DESCRIPTION Balance of an account ``` -_See code: [src/commands/account/balance.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/account/balance.ts)_ +_See code: [src/commands/account/balance.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/account/balance.ts)_ ## `swanky account create` @@ -320,7 +320,7 @@ DESCRIPTION Create a new dev account in config ``` -_See code: [src/commands/account/create.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/account/create.ts)_ +_See code: [src/commands/account/create.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/account/create.ts)_ ## `swanky account default [ACCOUNTALIAS]` @@ -341,7 +341,7 @@ DESCRIPTION Set default account to use ``` -_See code: [src/commands/account/default.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/account/default.ts)_ +_See code: [src/commands/account/default.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/account/default.ts)_ ## `swanky account faucet ALIAS` @@ -361,7 +361,7 @@ DESCRIPTION Transfer some tokens from faucet to an account ``` -_See code: [src/commands/account/faucet.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/account/faucet.ts)_ +_See code: [src/commands/account/faucet.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/account/faucet.ts)_ ## `swanky account list` @@ -381,7 +381,7 @@ ALIASES $ swanky account ls ``` -_See code: [src/commands/account/list.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/account/list.ts)_ +_See code: [src/commands/account/list.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/account/list.ts)_ ## `swanky account ls` @@ -415,7 +415,7 @@ FLAGS -v, --verbose Display more info in the result logs ``` -_See code: [src/commands/clear/index.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/clear/index.ts)_ +_See code: [src/commands/clear/index.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/clear/index.ts)_ ## `swanky contract compile [CONTRACTNAME]` @@ -439,7 +439,7 @@ DESCRIPTION Compile the smart contract(s) in your contracts directory ``` -_See code: [src/commands/contract/compile.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/contract/compile.ts)_ +_See code: [src/commands/contract/compile.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/contract/compile.ts)_ ## `swanky contract deploy CONTRACTNAME` @@ -464,7 +464,7 @@ DESCRIPTION Deploy contract to a running node ``` -_See code: [src/commands/contract/deploy.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/contract/deploy.ts)_ +_See code: [src/commands/contract/deploy.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/contract/deploy.ts)_ ## `swanky contract explain CONTRACTNAME` @@ -484,7 +484,7 @@ DESCRIPTION Explain contract messages based on the contracts' metadata ``` -_See code: [src/commands/contract/explain.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/contract/explain.ts)_ +_See code: [src/commands/contract/explain.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/contract/explain.ts)_ ## `swanky contract new CONTRACTNAME` @@ -505,7 +505,7 @@ DESCRIPTION Generate a new smart contract template inside a project ``` -_See code: [src/commands/contract/new.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/contract/new.ts)_ +_See code: [src/commands/contract/new.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/contract/new.ts)_ ## `swanky contract query CONTRACTNAME MESSAGENAME` @@ -532,7 +532,7 @@ DESCRIPTION Call a query message on smart contract ``` -_See code: [src/commands/contract/query.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/contract/query.ts)_ +_See code: [src/commands/contract/query.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/contract/query.ts)_ ## `swanky contract test [CONTRACTNAME]` @@ -554,7 +554,7 @@ DESCRIPTION Run tests for a given contact ``` -_See code: [src/commands/contract/test.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/contract/test.ts)_ +_See code: [src/commands/contract/test.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/contract/test.ts)_ ## `swanky contract tx CONTRACTNAME MESSAGENAME` @@ -582,7 +582,7 @@ DESCRIPTION Call a Tx message on smart contract ``` -_See code: [src/commands/contract/tx.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/contract/tx.ts)_ +_See code: [src/commands/contract/tx.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/contract/tx.ts)_ ## `swanky contract verify [CONTRACTNAME]` @@ -603,7 +603,7 @@ DESCRIPTION Verify the smart contract(s) in your contracts directory ``` -_See code: [src/commands/contract/verify.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/contract/verify.ts)_ +_See code: [src/commands/contract/verify.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/contract/verify.ts)_ ## `swanky env check` @@ -621,7 +621,7 @@ DESCRIPTION Check installed package versions and compatibility ``` -_See code: [src/commands/env/check.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/env/check.ts)_ +_See code: [src/commands/env/check.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/env/check.ts)_ ## `swanky env install` @@ -641,7 +641,7 @@ DESCRIPTION Install dev dependencies ``` -_See code: [src/commands/env/install.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/env/install.ts)_ +_See code: [src/commands/env/install.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/env/install.ts)_ ## `swanky generate tests [CONTRACTNAME]` @@ -663,7 +663,7 @@ DESCRIPTION Generate test files for the specified contract ``` -_See code: [src/commands/generate/tests.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/generate/tests.ts)_ +_See code: [src/commands/generate/tests.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/generate/tests.ts)_ ## `swanky generate types CONTRACTNAME` @@ -683,7 +683,7 @@ DESCRIPTION Generate types from compiled contract metadata ``` -_See code: [src/commands/generate/types.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/generate/types.ts)_ +_See code: [src/commands/generate/types.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/generate/types.ts)_ ## `swanky help [COMMAND]` @@ -726,7 +726,7 @@ DESCRIPTION Generate a new smart contract environment ``` -_See code: [src/commands/init/index.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/init/index.ts)_ +_See code: [src/commands/init/index.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/init/index.ts)_ ## `swanky node chopsticks init` @@ -743,7 +743,7 @@ DESCRIPTION Initialize chopsticks config ``` -_See code: [src/commands/node/chopsticks/init.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/node/chopsticks/init.ts)_ +_See code: [src/commands/node/chopsticks/init.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/node/chopsticks/init.ts)_ ## `swanky node chopsticks start` @@ -761,7 +761,7 @@ DESCRIPTION Start chopsticks ``` -_See code: [src/commands/node/chopsticks/start.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/node/chopsticks/start.ts)_ +_See code: [src/commands/node/chopsticks/start.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/node/chopsticks/start.ts)_ ## `swanky node install` @@ -774,13 +774,13 @@ USAGE FLAGS -v, --verbose Display more info in the result logs --set-version= Specify version of swanky node to install. - List of supported versions: 1.6.0, 1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, 1.0.0 + List of supported versions: 1.7.0, 1.6.0, 1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, 1.0.0 DESCRIPTION Install swanky node binary ``` -_See code: [src/commands/node/install.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/node/install.ts)_ +_See code: [src/commands/node/install.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/node/install.ts)_ ## `swanky node purge` @@ -797,7 +797,7 @@ DESCRIPTION Purge local chain state ``` -_See code: [src/commands/node/purge.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/node/purge.ts)_ +_See code: [src/commands/node/purge.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/node/purge.ts)_ ## `swanky node start` @@ -828,7 +828,7 @@ DESCRIPTION Start a local node ``` -_See code: [src/commands/node/start.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/node/start.ts)_ +_See code: [src/commands/node/start.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/node/start.ts)_ ## `swanky node version` @@ -845,7 +845,7 @@ DESCRIPTION Show swanky node version ``` -_See code: [src/commands/node/version.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/node/version.ts)_ +_See code: [src/commands/node/version.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/node/version.ts)_ ## `swanky plugins` @@ -1163,7 +1163,7 @@ DESCRIPTION Initialize Zombienet ``` -_See code: [src/commands/zombienet/init.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/zombienet/init.ts)_ +_See code: [src/commands/zombienet/init.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/zombienet/init.ts)_ ## `swanky zombienet start` @@ -1181,5 +1181,5 @@ DESCRIPTION Start Zombienet ``` -_See code: [src/commands/zombienet/start.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0-beta.0/src/commands/zombienet/start.ts)_ +_See code: [src/commands/zombienet/start.ts](https://github.com/inkdevhub/swanky-cli/blob/v4.0.0/src/commands/zombienet/start.ts)_ diff --git a/base-image/Dockerfile b/base-image/Dockerfile index 8d399114..2fe118a5 100644 --- a/base-image/Dockerfile +++ b/base-image/Dockerfile @@ -13,7 +13,7 @@ RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install - RUN apt-get install -y binaryen pkg-config libssl-dev # Download and install swanky-cli and verify the installation -RUN curl -L https://github.com/swankyhub/swanky-cli/releases/download/v3.1.0-beta.0/swanky-v3.1.0-beta.0-9153ae7-linux-x64.tar.gz | tar xz -C /opt && \ +RUN curl -L https://github.com/swankyhub/swanky-cli/releases/download/v4.0.0/swanky-v4.0.0-81446c0-linux-x64.tar.gz | tar xz -C /opt && \ ln -s /opt/swanky/bin/swanky /usr/local/bin/swanky # Install Rustup and Rust, additional components, packages, and verify the installations diff --git a/package.json b/package.json index 86300827..a53ec9bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@astar-network/swanky-cli", - "version": "4.0.0-beta.0", + "version": "4.0.0", "description": "All in one WASM smart contract development toolset", "author": "Astar network", "license": "MIT", diff --git a/src/lib/consts.ts b/src/lib/consts.ts index ad7d4209..fce84a95 100644 --- a/src/lib/consts.ts +++ b/src/lib/consts.ts @@ -1,6 +1,6 @@ import { swankyNodeVersions } from "./nodeInfo.js"; -export const DEFAULT_NODE_INFO = swankyNodeVersions.get("1.6.0")!; +export const DEFAULT_NODE_INFO = swankyNodeVersions.get("1.7.0")!; export const DEFAULT_NETWORK_URL = "ws://127.0.0.1:9944"; export const DEFAULT_ASTAR_NETWORK_URL = "wss://rpc.astar.network"; diff --git a/src/lib/nodeInfo.ts b/src/lib/nodeInfo.ts index cb53e8dd..7b744e58 100644 --- a/src/lib/nodeInfo.ts +++ b/src/lib/nodeInfo.ts @@ -15,6 +15,26 @@ export interface nodeInfo { } export const swankyNodeVersions = new Map([ + [ + "1.7.0", + { + version: "1.7.0", + polkadotPalletVersions: "polkadot-v0.9.43", + supportedInk: "v5.0.0", + downloadUrl: { + darwin: { + arm64: + "https://github.com/AstarNetwork/swanky-node/releases/download/v1.7.0/swanky-node-v1.7.0-macOS-universal.tar.gz", + x64: "https://github.com/AstarNetwork/swanky-node/releases/download/v1.7.0/swanky-node-v1.7.0-macOS-universal.tar.gz", + }, + linux: { + arm64: + "https://github.com/AstarNetwork/swanky-node/releases/download/v1.7.0/swanky-node-v1.7.0-ubuntu-aarch64.tar.gz", + x64: "https://github.com/AstarNetwork/swanky-node/releases/download/v1.7.0/swanky-node-v1.7.0-ubuntu-x86_64.tar.gz", + }, + }, + }, + ], [ "1.6.0", {