From 8b511c7fb4cf55a58f499398c2af19ccbef80563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Zeppelin?= Date: Wed, 3 May 2023 11:09:35 +0200 Subject: [PATCH 1/7] bump minor version in common,web,nodejs packages --- packages/common/CHANGELOG.md | 2 +- packages/common/package.json | 2 +- packages/nodejs/CHANGELOG.md | 6 ++++++ packages/nodejs/package.json | 4 ++-- packages/web/CHANGELOG.md | 6 ++++++ packages/web/package.json | 4 ++-- yarn.lock | 41 ++++++++++++++++++++++++++++++++---- 7 files changed, 55 insertions(+), 10 deletions(-) diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index 9f47ee94b..231d5f2dc 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 6.5.0 2023-5-03 ### Added - Utility functions `uleb128Decode` and `uleb128Encode` functions for decoding and encoding as unsigned leb128 respectively. diff --git a/packages/common/package.json b/packages/common/package.json index 2b24c0e6a..7dcf2a3f5 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@concordium/common-sdk", - "version": "6.4.2", + "version": "6.5.0", "license": "Apache-2.0", "engines": { "node": ">=14.16.0" diff --git a/packages/nodejs/CHANGELOG.md b/packages/nodejs/CHANGELOG.md index 041036957..976c1538d 100644 --- a/packages/nodejs/CHANGELOG.md +++ b/packages/nodejs/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 6.4.0 2023-5-03 + +### Changed + +- Bumped @concordium/common-sdk to 6.5.0. (Adds `CIS2Contract`) + ## 6.3.0 2023-3-22 ### Changed diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index ac4b22c35..2c933d054 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@concordium/node-sdk", - "version": "6.3.0", + "version": "6.4.0", "description": "Helpers for interacting with the Concordium node", "repository": { "type": "git", @@ -60,7 +60,7 @@ "build-dev": "tsc" }, "dependencies": { - "@concordium/common-sdk": "6.4.2", + "@concordium/common-sdk": "6.5.0", "@grpc/grpc-js": "^1.3.4", "@protobuf-ts/grpc-transport": "^2.8.2", "buffer": "^6.0.3", diff --git a/packages/web/CHANGELOG.md b/packages/web/CHANGELOG.md index eb864ad2b..3ee490647 100644 --- a/packages/web/CHANGELOG.md +++ b/packages/web/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 3.5.0 2023-5-03 + +### Changed + +- Bumped @concordium/common-sdk to 6.5.0. (Adds `CIS2Contract`) + ## 3.4.2 2023-4-21 ### Changed diff --git a/packages/web/package.json b/packages/web/package.json index bda7a704b..99b8ce558 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@concordium/web-sdk", - "version": "3.4.2", + "version": "3.5.0", "license": "Apache-2.0", "browser": "lib/concordium.min.js", "types": "lib/index.d.ts", @@ -48,7 +48,7 @@ "webpack-cli": "^4.9.2" }, "dependencies": { - "@concordium/common-sdk": "6.4.2", + "@concordium/common-sdk": "6.5.0", "@concordium/rust-bindings": "0.11.1", "@grpc/grpc-js": "^1.3.4", "@protobuf-ts/grpcweb-transport": "^2.8.2", diff --git a/yarn.lock b/yarn.lock index 20c6b6e75..2098c52e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1312,7 +1312,7 @@ __metadata: languageName: node linkType: hard -"@concordium/common-sdk@6.4.2, @concordium/common-sdk@workspace:packages/common": +"@concordium/common-sdk@6.5.0, @concordium/common-sdk@workspace:packages/common": version: 0.0.0-use.local resolution: "@concordium/common-sdk@workspace:packages/common" dependencies: @@ -1350,6 +1350,26 @@ __metadata: languageName: unknown linkType: soft +"@concordium/common-sdk@npm:6.4.0": + version: 6.4.0 + resolution: "@concordium/common-sdk@npm:6.4.0" + dependencies: + "@concordium/rust-bindings": 0.11.0 + "@grpc/grpc-js": ^1.3.4 + "@noble/ed25519": ^1.7.1 + "@protobuf-ts/runtime-rpc": ^2.8.2 + "@scure/bip39": ^1.1.0 + bs58check: ^2.1.2 + buffer: ^6.0.3 + cross-fetch: 3.1.5 + hash.js: ^1.1.7 + iso-3166-1: ^2.1.1 + json-bigint: ^1.0.0 + uuid: ^8.3.2 + checksum: d4d8fcd1961cfbe6939958afec90eeff05cc88c83cbb5bd6e1dcf5f887324e15b2c175e4e0dced4cf2860cdc06dcb945b94c88a7790f087028d4f1dcd9b40f86 + languageName: node + linkType: hard + "@concordium/common-sdk@npm:6.4.1": version: 6.4.1 resolution: "@concordium/common-sdk@npm:6.4.1" @@ -1370,11 +1390,24 @@ __metadata: languageName: node linkType: hard -"@concordium/node-sdk@6.3.0, @concordium/node-sdk@workspace:packages/nodejs": +"@concordium/node-sdk@npm:6.3.0": + version: 6.3.0 + resolution: "@concordium/node-sdk@npm:6.3.0" + dependencies: + "@concordium/common-sdk": 6.4.0 + "@grpc/grpc-js": ^1.3.4 + "@protobuf-ts/grpc-transport": ^2.8.2 + buffer: ^6.0.3 + google-protobuf: ^3.20.1 + checksum: 1f04f81bbe19339ca9498c2b8f7e26e3423eb05fe16e4cc8af1314f7570863115ce0b5ce68c02017261cfb6eb5619715778d32bfedd8e80bc9941ace1b4d22ed + languageName: node + linkType: hard + +"@concordium/node-sdk@workspace:packages/nodejs": version: 0.0.0-use.local resolution: "@concordium/node-sdk@workspace:packages/nodejs" dependencies: - "@concordium/common-sdk": 6.4.2 + "@concordium/common-sdk": 6.5.0 "@grpc/grpc-js": ^1.3.4 "@noble/ed25519": ^1.7.1 "@protobuf-ts/grpc-transport": ^2.8.2 @@ -1420,7 +1453,7 @@ __metadata: version: 0.0.0-use.local resolution: "@concordium/web-sdk@workspace:packages/web" dependencies: - "@concordium/common-sdk": 6.4.2 + "@concordium/common-sdk": 6.5.0 "@concordium/rust-bindings": 0.11.1 "@grpc/grpc-js": ^1.3.4 "@protobuf-ts/grpcweb-transport": ^2.8.2 From 873890fce1e334aa682c6ee737e82c3809504e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Zeppelin?= Date: Wed, 3 May 2023 11:45:35 +0200 Subject: [PATCH 2/7] Leftovers from cis2 PR --- packages/common/src/util.ts | 2 +- packages/web/README.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/common/src/util.ts b/packages/common/src/util.ts index e5e794a60..e6463c440 100644 --- a/packages/common/src/util.ts +++ b/packages/common/src/util.ts @@ -232,7 +232,7 @@ export async function streamToList( /** * Creates a function that takes either a `T` or `T[]` from a function that takes `T[]`. * - * @param {(input: T[]) => Buffer} fun - A function that takes `T[]` + * @param {(input: T[]) => R} fun - A function that takes `T[]` * * @example * const serializer = makeDynamicFunction(serialize); diff --git a/packages/web/README.md b/packages/web/README.md index 8b3b78091..2dd37471f 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -20,6 +20,8 @@ Wrappers for interacting with the Concordium node, for the web environment. - [GetCryptographicParameters.html](#getcryptographicparametershtml) - [GetAccountInfo.html](#getaccountinfohtml) - [GetModuleSource.html](#getmodulesourcehtml) + - [SendCIS2Transfer.html](#sendcis2transferhtml) + - [SendCIS2UpdateOperator.html](#sendcis2updateoperatorhtml) - [Build](#build) - [Building for a release](#building-for-a-release) - [Publishing a release](#publishing-a-release) @@ -87,6 +89,12 @@ An example of getting the info of a given account using a JSON-RPC server. ## GetModuleSource.html An example of getting the source of a model on the chain using a JSON-RPC server. +## SendCIS2Transfer.html +An example of sending a CIS2 "transfer" transaction by utilizing the `CIS2Contract` class. Please note that this example requires the Concordium Browser Wallet to be installed to work. + +## SendCIS2UpdateOperator.html +An example of sending a CIS2 "updateOperator" transaction by utilizing the `CIS2Contract` class. Please note that this example requires the Concordium Browser Wallet to be installed to work. + # Build ## Building for a release From 5f71981f8ce3f350db41e3390e6eb98b0f4d4773 Mon Sep 17 00:00:00 2001 From: Hjort Date: Wed, 3 May 2023 13:16:32 +0200 Subject: [PATCH 3/7] Fix sendCIS2UpdateOperator web example --- packages/web/example/SendCIS2UpdateOperator.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/web/example/SendCIS2UpdateOperator.html b/packages/web/example/SendCIS2UpdateOperator.html index 1ccf5789e..e53b89a15 100644 --- a/packages/web/example/SendCIS2UpdateOperator.html +++ b/packages/web/example/SendCIS2UpdateOperator.html @@ -30,7 +30,7 @@ const address = {index: BigInt(index.value), subindex: 0n}; const contract = await concordiumSDK.CIS2Contract.create(client, address); - const checkedType = Object.values(type).find(field => field.checked).value; + const checkedType = Object.values(updateType).find(field => field.checked).value; const update = {type: checkedType, address: operator.value}; //const update = {type: checkedType, address}; // Example with contract address, using same address as used to instantiate the contract class @@ -56,9 +56,9 @@ Update type: - Add + Add
- Remove + Remove

From 4cf858dcd1f29dc4ccbd56df22e85bf898d911c3 Mon Sep 17 00:00:00 2001 From: Hjort Date: Wed, 3 May 2023 13:20:03 +0200 Subject: [PATCH 4/7] Examples now points to SDK in workspace always --- examples/package.json | 3 +- examples/shared/util.ts | 2 +- yarn.lock | 65 ++--------------------------------------- 3 files changed, 4 insertions(+), 66 deletions(-) diff --git a/examples/package.json b/examples/package.json index e7526def6..3a92e118e 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,8 +1,7 @@ { "type": "module", "dependencies": { - "@concordium/common-sdk": "6.4.1", - "@concordium/node-sdk": "6.3.0", + "@concordium/node-sdk": "workspace:^", "@grpc/grpc-js": "^1.3.4", "@typescript-eslint/eslint-plugin": "^4.28.1", "@typescript-eslint/parser": "^4.28.1", diff --git a/examples/shared/util.ts b/examples/shared/util.ts index b57b00647..f699a29b3 100644 --- a/examples/shared/util.ts +++ b/examples/shared/util.ts @@ -1,4 +1,4 @@ -import { Base58String, ContractAddress } from '@concordium/common-sdk'; +import { Base58String, ContractAddress } from '@concordium/node-sdk'; export const parseAddress = (input: string): Base58String | ContractAddress => { if (!input.includes(',')) { diff --git a/yarn.lock b/yarn.lock index 2098c52e0..eaedc129f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1350,60 +1350,7 @@ __metadata: languageName: unknown linkType: soft -"@concordium/common-sdk@npm:6.4.0": - version: 6.4.0 - resolution: "@concordium/common-sdk@npm:6.4.0" - dependencies: - "@concordium/rust-bindings": 0.11.0 - "@grpc/grpc-js": ^1.3.4 - "@noble/ed25519": ^1.7.1 - "@protobuf-ts/runtime-rpc": ^2.8.2 - "@scure/bip39": ^1.1.0 - bs58check: ^2.1.2 - buffer: ^6.0.3 - cross-fetch: 3.1.5 - hash.js: ^1.1.7 - iso-3166-1: ^2.1.1 - json-bigint: ^1.0.0 - uuid: ^8.3.2 - checksum: d4d8fcd1961cfbe6939958afec90eeff05cc88c83cbb5bd6e1dcf5f887324e15b2c175e4e0dced4cf2860cdc06dcb945b94c88a7790f087028d4f1dcd9b40f86 - languageName: node - linkType: hard - -"@concordium/common-sdk@npm:6.4.1": - version: 6.4.1 - resolution: "@concordium/common-sdk@npm:6.4.1" - dependencies: - "@concordium/rust-bindings": 0.11.0 - "@grpc/grpc-js": ^1.3.4 - "@noble/ed25519": ^1.7.1 - "@protobuf-ts/runtime-rpc": ^2.8.2 - "@scure/bip39": ^1.1.0 - bs58check: ^2.1.2 - buffer: ^6.0.3 - cross-fetch: 3.1.5 - hash.js: ^1.1.7 - iso-3166-1: ^2.1.1 - json-bigint: ^1.0.0 - uuid: ^8.3.2 - checksum: 26cce68b496f9799359666d7ddf430c659c0250e16a96c8bfe1956162f737517896a9ab9e0c9a7a3a17117ee6d763a91cbcde20891c76d87444f67299a37c8c6 - languageName: node - linkType: hard - -"@concordium/node-sdk@npm:6.3.0": - version: 6.3.0 - resolution: "@concordium/node-sdk@npm:6.3.0" - dependencies: - "@concordium/common-sdk": 6.4.0 - "@grpc/grpc-js": ^1.3.4 - "@protobuf-ts/grpc-transport": ^2.8.2 - buffer: ^6.0.3 - google-protobuf: ^3.20.1 - checksum: 1f04f81bbe19339ca9498c2b8f7e26e3423eb05fe16e4cc8af1314f7570863115ce0b5ce68c02017261cfb6eb5619715778d32bfedd8e80bc9941ace1b4d22ed - languageName: node - linkType: hard - -"@concordium/node-sdk@workspace:packages/nodejs": +"@concordium/node-sdk@workspace:^, @concordium/node-sdk@workspace:packages/nodejs": version: 0.0.0-use.local resolution: "@concordium/node-sdk@workspace:packages/nodejs" dependencies: @@ -1442,13 +1389,6 @@ __metadata: languageName: unknown linkType: soft -"@concordium/rust-bindings@npm:0.11.0": - version: 0.11.0 - resolution: "@concordium/rust-bindings@npm:0.11.0" - checksum: a6c437cb782b7b2e9f217215dd4dbed9ffb8b3ef46fa307952aca3ae8f166cb96687de64efd18490aec7e86d58712dccb7d1a8bf63c151e3ed2a0170f066cd6d - languageName: node - linkType: hard - "@concordium/web-sdk@workspace:packages/web": version: 0.0.0-use.local resolution: "@concordium/web-sdk@workspace:packages/web" @@ -4406,8 +4346,7 @@ __metadata: version: 0.0.0-use.local resolution: "examples-1f5c57@workspace:examples" dependencies: - "@concordium/common-sdk": 6.4.1 - "@concordium/node-sdk": 6.3.0 + "@concordium/node-sdk": "workspace:^" "@grpc/grpc-js": ^1.3.4 "@typescript-eslint/eslint-plugin": ^4.28.1 "@typescript-eslint/parser": ^4.28.1 From 3355cd5bfa77c3312a62ca987c84b5040297da9a Mon Sep 17 00:00:00 2001 From: Hjort Date: Wed, 3 May 2023 13:29:28 +0200 Subject: [PATCH 5/7] Update examples readme + move root level examples into common folder --- examples/{ => common}/buildAccountSigner.ts | 0 examples/{ => common}/cis0Supports.ts | 0 examples/readme.md | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename examples/{ => common}/buildAccountSigner.ts (100%) rename examples/{ => common}/cis0Supports.ts (100%) diff --git a/examples/buildAccountSigner.ts b/examples/common/buildAccountSigner.ts similarity index 100% rename from examples/buildAccountSigner.ts rename to examples/common/buildAccountSigner.ts diff --git a/examples/cis0Supports.ts b/examples/common/cis0Supports.ts similarity index 100% rename from examples/cis0Supports.ts rename to examples/common/cis0Supports.ts diff --git a/examples/readme.md b/examples/readme.md index 85b4c0a1c..cf2e1e20f 100644 --- a/examples/readme.md +++ b/examples/readme.md @@ -1,8 +1,8 @@ ## Examples for the Concordium NodeJS-SDK This is a collection of scripts/examples that utilizes the SDK. There are -two directories with examples `client`, containing examples that utilize the -client to interact with a Concordium node, and `common`, that use various general functions from the library. To +three directories with examples `client`, containing examples that utilize the +client to interact with a Concordium node, `cis2` containing examples that helps interact with CIS-2 compliant smart contracts and `common`, that use various general functions from the library. To run an example call: ```shell From 031517867448c50243555a91755bcdf8745e7414 Mon Sep 17 00:00:00 2001 From: Hjort Date: Wed, 3 May 2023 13:35:36 +0200 Subject: [PATCH 6/7] Always recommend run-example --- examples/client/banPeer.ts | 2 +- examples/client/dumpStart.ts | 2 +- examples/client/dumpStop.ts | 2 +- examples/client/getAccountList.ts | 2 +- examples/client/getAccountNonFinalizedTransactions.ts | 2 +- examples/client/getAncestors.ts | 2 +- examples/client/getAnonymityRevokers.ts | 2 +- examples/client/getBakerList.ts | 2 +- examples/client/getBannedPeers.ts | 3 +-- examples/client/getBlockChainParameters.ts | 3 +-- examples/client/getBlockFinalizationSummary.ts | 2 +- examples/client/getBlockInfo.ts | 2 +- examples/client/getBlockPendingUpdates.ts | 2 +- examples/client/getBlockSpecialEvents.ts | 2 +- examples/client/getBlockTransactionEvents.ts | 2 +- examples/client/getBlocks.ts | 2 +- examples/client/getBlocksAtHeightRelative.ts | 6 +++--- examples/client/getBranches.ts | 2 +- examples/client/getConsensusStatus.ts | 2 +- examples/readme.md | 2 +- 20 files changed, 22 insertions(+), 24 deletions(-) diff --git a/examples/client/banPeer.ts b/examples/client/banPeer.ts index 74a5e2653..aa6aabe97 100644 --- a/examples/client/banPeer.ts +++ b/examples/client/banPeer.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Required --peer, -p The ip of the peer to ban. diff --git a/examples/client/dumpStart.ts b/examples/client/dumpStart.ts index 1ee700d99..572a2275e 100644 --- a/examples/client/dumpStart.ts +++ b/examples/client/dumpStart.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Required --filepath, -f Specifies which file to dump the packages into diff --git a/examples/client/dumpStop.ts b/examples/client/dumpStop.ts index 6384881f3..cf5005ea1 100644 --- a/examples/client/dumpStop.ts +++ b/examples/client/dumpStop.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getAccountList.ts b/examples/client/getAccountList.ts index 2d59e8ac2..06aecca71 100644 --- a/examples/client/getAccountList.ts +++ b/examples/client/getAccountList.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getAccountNonFinalizedTransactions.ts b/examples/client/getAccountNonFinalizedTransactions.ts index 2cbaf6507..ccbd16667 100644 --- a/examples/client/getAccountNonFinalizedTransactions.ts +++ b/examples/client/getAccountNonFinalizedTransactions.ts @@ -10,7 +10,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Required --account, -a The account to get transactions from diff --git a/examples/client/getAncestors.ts b/examples/client/getAncestors.ts index c6ca8d6b5..f8c872fc4 100644 --- a/examples/client/getAncestors.ts +++ b/examples/client/getAncestors.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Required --max-ancestors, -m Maximum amount of ancestors to get diff --git a/examples/client/getAnonymityRevokers.ts b/examples/client/getAnonymityRevokers.ts index 57290fcb2..0a4dc1ef2 100644 --- a/examples/client/getAnonymityRevokers.ts +++ b/examples/client/getAnonymityRevokers.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBakerList.ts b/examples/client/getBakerList.ts index e17b7a7bf..cee869f87 100644 --- a/examples/client/getBakerList.ts +++ b/examples/client/getBakerList.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBannedPeers.ts b/examples/client/getBannedPeers.ts index db2a75bc7..7e0e3e559 100644 --- a/examples/client/getBannedPeers.ts +++ b/examples/client/getBannedPeers.ts @@ -6,8 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] - + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBlockChainParameters.ts b/examples/client/getBlockChainParameters.ts index fdc90a50b..2103a158b 100644 --- a/examples/client/getBlockChainParameters.ts +++ b/examples/client/getBlockChainParameters.ts @@ -10,8 +10,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] - + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBlockFinalizationSummary.ts b/examples/client/getBlockFinalizationSummary.ts index 2367c41cb..5aeb2a99f 100644 --- a/examples/client/getBlockFinalizationSummary.ts +++ b/examples/client/getBlockFinalizationSummary.ts @@ -9,7 +9,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBlockInfo.ts b/examples/client/getBlockInfo.ts index 9ed268a4f..04762f008 100644 --- a/examples/client/getBlockInfo.ts +++ b/examples/client/getBlockInfo.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBlockPendingUpdates.ts b/examples/client/getBlockPendingUpdates.ts index 8a76dd45c..73e8de5e4 100644 --- a/examples/client/getBlockPendingUpdates.ts +++ b/examples/client/getBlockPendingUpdates.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBlockSpecialEvents.ts b/examples/client/getBlockSpecialEvents.ts index ba26e16a5..e83305e01 100644 --- a/examples/client/getBlockSpecialEvents.ts +++ b/examples/client/getBlockSpecialEvents.ts @@ -9,7 +9,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBlockTransactionEvents.ts b/examples/client/getBlockTransactionEvents.ts index f35d9171d..714d14c90 100644 --- a/examples/client/getBlockTransactionEvents.ts +++ b/examples/client/getBlockTransactionEvents.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBlocks.ts b/examples/client/getBlocks.ts index cd1e5b1ee..6df169a9d 100644 --- a/examples/client/getBlocks.ts +++ b/examples/client/getBlocks.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getBlocksAtHeightRelative.ts b/examples/client/getBlocksAtHeightRelative.ts index aebca1d0e..4eaad0eba 100644 --- a/examples/client/getBlocksAtHeightRelative.ts +++ b/examples/client/getBlocksAtHeightRelative.ts @@ -10,14 +10,14 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Required --height, Height starting from the genesis block at the genesis index. --restrict, -r Whether to return results only from the specified genesis index (true), or allow results from more recent genesis indices as well (false). - --genesis-index, -g The index of a (re)genesis block. The initial genesis block has index 0 - and each subsequent regenesis has an incrementally higher index. + --genesis-index, -g The index of a (re)genesis block. The initial genesis block has index 0 + and each subsequent regenesis has an incrementally higher index. Options --help, Displays this message. diff --git a/examples/client/getBranches.ts b/examples/client/getBranches.ts index 178ffd97e..7295770d5 100644 --- a/examples/client/getBranches.ts +++ b/examples/client/getBranches.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/client/getConsensusStatus.ts b/examples/client/getConsensusStatus.ts index 7d6d163c1..2ce55aff6 100644 --- a/examples/client/getConsensusStatus.ts +++ b/examples/client/getConsensusStatus.ts @@ -6,7 +6,7 @@ import meow from 'meow'; const cli = meow( ` Usage - $ yarn ts-node [options] + $ yarn run-example [options] Options --help, Displays this message diff --git a/examples/readme.md b/examples/readme.md index cf2e1e20f..aa356aa97 100644 --- a/examples/readme.md +++ b/examples/readme.md @@ -6,7 +6,7 @@ client to interact with a Concordium node, `cis2` containing examples that help run an example call: ```shell -yarn ts-node /path/to/example.ts [opts] +yarn run-example /path/to/example.ts [opts] ``` Where opts are any arguments that the example script takes. From b001d020ddaea3a725765482f941833c21dcd3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Zeppelin?= Date: Wed, 3 May 2023 13:55:19 +0200 Subject: [PATCH 7/7] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Søren Hjort <87635671+shjortConcordium@users.noreply.github.com> --- packages/web/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web/README.md b/packages/web/README.md index 2dd37471f..56e92cc3f 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -90,10 +90,10 @@ An example of getting the info of a given account using a JSON-RPC server. An example of getting the source of a model on the chain using a JSON-RPC server. ## SendCIS2Transfer.html -An example of sending a CIS2 "transfer" transaction by utilizing the `CIS2Contract` class. Please note that this example requires the Concordium Browser Wallet to be installed to work. +An example of sending a CIS2 "transfer" transaction by utilizing the `CIS2Contract` class. Please note that this example requires the [Concordium Wallet for Web](https://chrome.google.com/webstore/detail/concordium-wallet/mnnkpffndmickbiakofclnpoiajlegmg) to be installed to work. ## SendCIS2UpdateOperator.html -An example of sending a CIS2 "updateOperator" transaction by utilizing the `CIS2Contract` class. Please note that this example requires the Concordium Browser Wallet to be installed to work. +An example of sending a CIS2 "updateOperator" transaction by utilizing the `CIS2Contract` class. Please note that this example requires the [Concordium Wallet for Web](https://chrome.google.com/webstore/detail/concordium-wallet/mnnkpffndmickbiakofclnpoiajlegmg) to be installed to work. # Build