Skip to content

Commit

Permalink
[gear-idea] Bump gear-js/api (#1425)
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Yutanov <nikitayutanov@gmail.com>
  • Loading branch information
osipov-mit and nikitayutanov authored Oct 9, 2023
1 parent 0b75e39 commit c90a2af
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 175 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,6 @@ jobs:
run: |
cp api/programs/target/wasm32-unknown-unknown/release/* idea/tests/wasm-test
- name: "Prepare: Download app.opt.wasm"
working-directory: idea/tests/wasm-test
run: |
wget -O app.opt.wasm https://github.com/gear-foundation/dapps-app/releases/download/0.1.0/app.opt.wasm
- name: "Run tests"
timeout-minutes: 7
working-directory: idea/tests
Expand Down
94 changes: 0 additions & 94 deletions api/test/spec/meta/demo_gui_test.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions api/test/spec/meta/guestbook.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion idea/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "tsc"
},
"dependencies": {
"@gear-js/api": "0.33.0",
"@gear-js/api": "0.34.0",
"@polkadot/api": "10.9.1",
"winston": "3.7.2"
},
Expand Down
4 changes: 2 additions & 2 deletions idea/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"eject": "react-scripts eject"
},
"dependencies": {
"@gear-js/api": "0.33.6",
"@gear-js/react-hooks": "0.8.0",
"@gear-js/api": "0.34.0",
"@gear-js/react-hooks": "0.8.1",
"@gear-js/ui": "0.5.19",
"@hcaptcha/react-hcaptcha": "^1.4.4",
"@mantine/form": "^5.4.0",
Expand Down
2 changes: 1 addition & 1 deletion idea/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"license": "GPL-3.0",
"dependencies": {
"@gear-js/api": "0.33.0",
"@gear-js/api": "0.34.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "10.9.1",
"amqplib": "0.10.3",
Expand Down
8 changes: 4 additions & 4 deletions idea/indexer/src/gear/indexer.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
CodeMetadata,
CodeChanged,
GearApi,
GearCommonCodeMetadata,
GearCommonProgram,
generateCodeHash,
MessageQueued,
IProgram,
ProgramChangedData,
} from '@gear-js/api';
import { HexString } from '@polkadot/util/types';
Expand Down Expand Up @@ -633,7 +633,7 @@ export class GearIndexer {
for (const id of progChangedEvents) {
const program = await this.getProgramWithoutIndexing(id);
if (!program) {
const progStorage = (await this.api.query.gearProgram.programStorage(id)) as Option<IProgram>;
const progStorage = (await this.api.query.gearProgram.programStorage(id)) as Option<GearCommonProgram>;
if (progStorage.isSome) {
if (progStorage.unwrap().isActive) {
const { codeHash } = progStorage.unwrap().asActive;
Expand Down Expand Up @@ -674,7 +674,7 @@ export class GearIndexer {
}

public async indexBlockWithMissedCode(codeId: HexString): Promise<Code | null> {
const metaStorage = (await this.api.query.gearProgram.metadataStorage(codeId)) as Option<CodeMetadata>;
const metaStorage = await this.api.query.gearProgram.metadataStorage(codeId) as Option<GearCommonCodeMetadata>;
if (metaStorage.isSome) {
const blockNumber = metaStorage.unwrap().blockNumber.toNumber();

Expand Down
2 changes: 1 addition & 1 deletion idea/meta-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"typescript": "^5.1.6"
},
"dependencies": {
"@gear-js/api": "0.33.0",
"@gear-js/api": "0.34.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "10.9.1",
"amqplib": "0.10.3",
Expand Down
2 changes: 1 addition & 1 deletion idea/test-balance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@gear-js/api": "0.33.0",
"@gear-js/api": "0.34.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "10.9.1",
"@types/amqplib": "0.8.2",
Expand Down
1 change: 1 addition & 0 deletions idea/tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ wasm/
dist/
.yarn/
wasm-test/*
!wasm-test/app.opt.wasm
genesis
4 changes: 2 additions & 2 deletions idea/tests/e2e/indexer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ describe('prepare', () => {
test('send message to test_meta', async () => {
const payload = testMetaMeta.createType(testMetaMeta.types.handle.input, { One: 'Alice' }).toHex();
const tx = await api.message.send(
{ destination: testMetaId, gasLimit: 2_000_000_000, payload, value: 1000 },
{ destination: testMetaId, gasLimit: 200_000_000_000, payload, value: 10_000_000_000_000 },
testMetaMeta,
);

Expand All @@ -376,7 +376,7 @@ describe('prepare', () => {
destination: destination.toHex(),
entry: 'handle',
payload,
value: '1000',
value: '10000000000000',
});
resolve(0);
}
Expand Down
2 changes: 1 addition & 1 deletion idea/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@babel/plugin-transform-typescript": "7.20.2",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "7.18.6",
"@gear-js/api": "0.33.0",
"@gear-js/api": "0.34.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "10.9.1",
"babel-jest": "28.1.3",
Expand Down
Binary file added idea/tests/wasm-test/app.opt.wasm
Binary file not shown.
1 change: 0 additions & 1 deletion idea/tests/wasm-test/ping.txt

This file was deleted.

43 changes: 16 additions & 27 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2258,33 +2258,22 @@ __metadata:
languageName: unknown
linkType: soft

"@gear-js/api@npm:0.33.0":
version: 0.33.0
resolution: "@gear-js/api@npm:0.33.0"
"@gear-js/api@npm:0.34.0":
version: 0.34.0
resolution: "@gear-js/api@npm:0.34.0"
peerDependencies:
"@polkadot/api": 10.9.1
"@polkadot/wasm-crypto": 7.2.1
rxjs: 7.8.1
checksum: 49cdd845dfc357baf2c206d628cfa879b67a091d0f2c14b212b7e9942f70bbd1b64ffe9b30a4749d492f156a61cca57936aa5a382e71465a2f7abf168ce382ca
languageName: node
linkType: hard

"@gear-js/api@npm:0.33.6":
version: 0.33.6
resolution: "@gear-js/api@npm:0.33.6"
peerDependencies:
"@polkadot/api": 10.9.1
"@polkadot/wasm-crypto": 7.2.1
rxjs: 7.8.1
checksum: f7276094884952f4ba5b300c7b603091d1a3993b8d5de74f08c480cac4cd58d9b18e83614362b3f8236adffd6e45b1b0250748a5348c56d1db9dd4693830a06e
checksum: 84a567b5a9d47dbbf66d51fb0f2747ecfdc109a6eefa71ff5966a87e14d948bb6aa9185425002f2ad808df5f0e8cd28104e69e718f76cee1a2ba68c3a401c27c
languageName: node
linkType: hard

"@gear-js/common@workspace:^, @gear-js/common@workspace:idea/common":
version: 0.0.0-use.local
resolution: "@gear-js/common@workspace:idea/common"
dependencies:
"@gear-js/api": 0.33.0
"@gear-js/api": 0.34.0
"@polkadot/api": 10.9.1
typescript: 4.7.4
winston: 3.7.2
Expand All @@ -2295,8 +2284,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@gear-js/frontend@workspace:idea/frontend"
dependencies:
"@gear-js/api": 0.33.6
"@gear-js/react-hooks": 0.8.0
"@gear-js/api": 0.34.0
"@gear-js/react-hooks": 0.8.1
"@gear-js/ui": 0.5.19
"@hcaptcha/react-hcaptcha": ^1.4.4
"@mantine/form": ^5.4.0
Expand Down Expand Up @@ -2365,7 +2354,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@gear-js/indexer@workspace:idea/indexer"
dependencies:
"@gear-js/api": 0.33.0
"@gear-js/api": 0.34.0
"@gear-js/common": "workspace:^"
"@polkadot/api": 10.9.1
"@types/amqplib": 0.10.1
Expand All @@ -2388,7 +2377,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@gear-js/meta-storage@workspace:idea/meta-storage"
dependencies:
"@gear-js/api": 0.33.0
"@gear-js/api": 0.34.0
"@gear-js/common": "workspace:^"
"@polkadot/api": 10.9.1
amqplib: 0.10.3
Expand All @@ -2400,24 +2389,24 @@ __metadata:
languageName: unknown
linkType: soft

"@gear-js/react-hooks@npm:0.8.0":
version: 0.8.0
resolution: "@gear-js/react-hooks@npm:0.8.0"
"@gear-js/react-hooks@npm:0.8.1":
version: 0.8.1
resolution: "@gear-js/react-hooks@npm:0.8.1"
peerDependencies:
"@gear-js/api": 0.33.6
"@gear-js/api": 0.34.0
"@polkadot/api": 10.9.1
"@polkadot/extension-dapp": 0.46.5
react: ^18.2.0
react-transition-group: 4.4.5
checksum: da785a1221a240585ef7774ad3660ae422f01d0c57d8bc60191dcc8e6975fc0eaedadaac80faae0959cd333e9dcaed45ad0d2e003622eceb4cd1831a4dc8e49a
checksum: 51a4f07adbea5f99dbfc5f4d9dfa7d43e576a205eeb821d89efb8d2a168f762db5708282e247c6f7e5beea2d8d4ba60feb895d7e062e7165f7fd7d69370a4849
languageName: node
linkType: hard

"@gear-js/test-balance@workspace:idea/test-balance":
version: 0.0.0-use.local
resolution: "@gear-js/test-balance@workspace:idea/test-balance"
dependencies:
"@gear-js/api": 0.33.0
"@gear-js/api": 0.34.0
"@gear-js/common": "workspace:^"
"@polkadot/api": 10.9.1
"@types/amqplib": 0.8.2
Expand Down Expand Up @@ -2459,7 +2448,7 @@ __metadata:
"@babel/plugin-transform-typescript": 7.20.2
"@babel/preset-env": 7.20.2
"@babel/preset-typescript": 7.18.6
"@gear-js/api": 0.33.0
"@gear-js/api": 0.34.0
"@gear-js/common": "workspace:^"
"@polkadot/api": 10.9.1
"@types/jest": 29.2.3
Expand Down

0 comments on commit c90a2af

Please sign in to comment.