Skip to content

Commit

Permalink
Merge branch 'master' into fix/submit-signed-tx-wo-signature
Browse files Browse the repository at this point in the history
  • Loading branch information
qiweiii committed Sep 8, 2023
2 parents a6df635 + 83fbb6c commit f507c1e
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 25 deletions.
5 changes: 2 additions & 3 deletions executor/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@acala-network/chopsticks-executor",
"description": "Chopsticks executor",
"version": "0.8.0-6",
"version": "0.8.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand All @@ -26,6 +26,5 @@
],
"main": "node/chopsticks_executor.js",
"types": "node/chopsticks_executor.d.ts",
"browser": "browser/index.js",
"stableVersion": "0.7.3"
"browser": "browser/index.js"
}
5 changes: 2 additions & 3 deletions packages/chopsticks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks",
"version": "0.8.0-6",
"version": "0.8.0",
"author": "Bryan Chen <xlchen1291@gmail.com>",
"license": "Apache-2.0",
"bin": "./chopsticks.js",
Expand Down Expand Up @@ -57,6 +57,5 @@
"default": "./lib/*.js"
},
"./package.json": "./package.json"
},
"stableVersion": "0.7.3"
}
}
3 changes: 2 additions & 1 deletion packages/chopsticks/src/rpc/substrate/chain.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Handlers, ResponseError } from '../shared'
import { Header } from '@polkadot/types/interfaces'

const processHeader = (header: any) => {
const processHeader = (header: Header) => {
const res = header.toJSON() as any
res.number = '0x' + res.number.toString(16) // number is hex format
return res
Expand Down
5 changes: 2 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks-core",
"version": "0.8.0-6",
"version": "0.8.0",
"author": "Bryan Chen <xlchen1291@gmail.com>",
"license": "Apache-2.0",
"scripts": {
Expand Down Expand Up @@ -44,6 +44,5 @@
"default": "./lib/*.js"
},
"./package.json": "./package.json"
},
"stableVersion": "0.7.3"
}
}
9 changes: 7 additions & 2 deletions packages/core/src/blockchain/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApplyExtrinsicResult } from '@polkadot/types/interfaces'
import { ApplyExtrinsicResult, Header } from '@polkadot/types/interfaces'
import { DataSource } from 'typeorm'
import { HexString } from '@polkadot/util/types'
import { RegisteredTypes } from '@polkadot/types/types'
Expand Down Expand Up @@ -152,7 +152,12 @@ export class Blockchain {
const { hash, number, header, extrinsics, parentHash } = blockData
const parentBlock = parentHash ? this.#blocksByHash[parentHash] : undefined
const storageDiff = blockData.storageDiff ?? undefined
const block = new Block(this, number, hash, parentBlock, { header, extrinsics, storageDiff })
const registry = await this.head.registry
const block = new Block(this, number, hash, parentBlock, {
header: registry.createType<Header>('Header', header),
extrinsics,
storageDiff,
})
this.#registerBlock(block)
return block
}
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/db/entities.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EntitySchema } from 'typeorm'
import { Header } from '@polkadot/types/interfaces'
import { HexString } from '@polkadot/util/types'

export const KeyValuePair = new EntitySchema<{
Expand Down Expand Up @@ -29,7 +28,7 @@ export const KeyValuePair = new EntitySchema<{
export const BlockEntity = new EntitySchema<{
hash: HexString
number: number
header: Header
header: object
parentHash: HexString | null
extrinsics: HexString[]
storageDiff: Record<HexString, HexString | null> | null
Expand Down
5 changes: 2 additions & 3 deletions packages/testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks-testing",
"version": "0.8.0-6",
"version": "0.8.0",
"author": "Bryan Chen <xlchen1291@gmail.com>",
"license": "Apache-2.0",
"scripts": {
Expand Down Expand Up @@ -32,6 +32,5 @@
"default": "./lib/*.js"
},
"./package.json": "./package.json"
},
"stableVersion": "0.7.3"
}
}
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1249,14 +1249,7 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:*":
version: 20.5.1
resolution: "@types/node@npm:20.5.1"
checksum: 3dbe611cd67afa987102c8558ee70f848949c5dcfee5f60abc073e55c0d7b048e391bf06bb1e0dc052cb7210ca97136ac496cbaf6e89123c989de6bd125fde82
languageName: node
linkType: hard

"@types/node@npm:^20.5.7":
"@types/node@npm:*, @types/node@npm:^20.5.7":
version: 20.5.7
resolution: "@types/node@npm:20.5.7"
checksum: fc284c8e16ddc04569730d58e87eae349eb1c3dd9020cb79a1862d9d9add6f04e7367a236f3252db8db2572f90278e250f4cd43d27d264972b54394eaba1ed76
Expand Down

0 comments on commit f507c1e

Please sign in to comment.