Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api] Release 0.36.0 #1474

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
## master
## 0.36.0

_11/07/2023_
_01/23/2024_

### Changes
https://github.com/gear-tech/gear-js/pull/1447
- Read storage of memory pages according to https://github.com/gear-tech/gear/pull/3166

https://github.com/gear-tech/gear-js/pull/1451
<i><b>Breaking changes</b></i>
- Fix `api.getExtrinsicFailedError` method. It now returns an object with the formatted docs, method and name of the error

https://github.com/gear-tech/gear-js/pull/1467
- Support new vouchers according to https://github.com/gear-tech/gear/pull/3606
- Bump polkadot dependencies to `10.11.2`

https://github.com/gear-tech/gear-js/pull/1472
- Support `uploadCode` call for vouchers.
- Support `uploadCode` call for vouchers according to https://github.com/gear-tech/gear/pull/3672.

## 0.35.2

Expand Down
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gear-js/api",
"version": "0.35.2",
"version": "0.36.0",
"description": "A JavaScript library that provides functionality to connect GEAR Component APIs.",
"main": "cjs/index.js",
"module": "index.js",
Expand Down
4 changes: 2 additions & 2 deletions api/src/Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export class GearProgramStorage {
async getProgramPages(programId: HexString, program: GearCommonActiveProgram, at?: HexString): Promise<IGearPages> {
const pages = {};
const query =
this._api.specVersion >= SPEC_VERSION.V1050
this._api.specVersion >= SPEC_VERSION.V1100
? this._api.query.gearProgram.memoryPages
: this._api.query.gearProgram.memoryPageStorage;

const args = this._api.specVersion >= SPEC_VERSION.V1050 ? [programId, program.memoryInfix] : [programId];
const args = this._api.specVersion >= SPEC_VERSION.V1100 ? [programId, program.memoryInfix] : [programId];

for (const page of program.pagesWithData) {
pages[page.toNumber()] = u8aToU8a(
Expand Down
4 changes: 2 additions & 2 deletions api/src/Voucher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class GearVoucher extends GearTransaction {
}

/**
* Issue a new voucher. This method is available only for runtime versions < 1050.
* Issue a new voucher. This method is available only for runtime versions < 1100.
* @deprecated
* @param to
* @param program
Expand Down Expand Up @@ -125,7 +125,7 @@ export class GearVoucher extends GearTransaction {
}

/**
* Use a voucher to send a message to a program. This method is available only for runtime versions < 1050.
* Use a voucher to send a message to a program. This method is available only for runtime versions < 1100.
* @deprecated
* @param params
* @returns
Expand Down
2 changes: 1 addition & 1 deletion api/src/consts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum SPEC_VERSION {
V1000 = 1000,
V1010 = 1010,
V1050 = 1050,
V1100 = 1100,
}
Loading