Skip to content

Commit 1360e96

Browse files
authored
Patch for handling totalDifficulty in release v0.2.98 (#541)
* Set total difficulty to zero if not available * Set patch version in packages
1 parent 467c173 commit 1360e96

File tree

14 files changed

+37
-37
lines changed

14 files changed

+37
-37
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "0.2.98",
5+
"version": "0.2.98-patch.1",
66
"npmClient": "yarn",
77
"useWorkspaces": true,
88
"command": {

packages/cache/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cerc-io/cache",
3-
"version": "0.2.98",
3+
"version": "0.2.98-patch.1",
44
"description": "Generic object cache",
55
"main": "dist/index.js",
66
"scripts": {

packages/cli/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cerc-io/cli",
3-
"version": "0.2.98",
3+
"version": "0.2.98-patch.1",
44
"main": "dist/index.js",
55
"license": "AGPL-3.0",
66
"scripts": {
@@ -15,13 +15,13 @@
1515
},
1616
"dependencies": {
1717
"@apollo/client": "^3.7.1",
18-
"@cerc-io/cache": "^0.2.98",
19-
"@cerc-io/ipld-eth-client": "^0.2.98",
18+
"@cerc-io/cache": "^0.2.98-patch.1",
19+
"@cerc-io/ipld-eth-client": "^0.2.98-patch.1",
2020
"@cerc-io/libp2p": "^0.42.2-laconic-0.1.4",
2121
"@cerc-io/nitro-node": "^0.1.15",
22-
"@cerc-io/peer": "^0.2.98",
23-
"@cerc-io/rpc-eth-client": "^0.2.98",
24-
"@cerc-io/util": "^0.2.98",
22+
"@cerc-io/peer": "^0.2.98-patch.1",
23+
"@cerc-io/rpc-eth-client": "^0.2.98-patch.1",
24+
"@cerc-io/util": "^0.2.98-patch.1",
2525
"@ethersproject/providers": "^5.4.4",
2626
"@graphql-tools/utils": "^9.1.1",
2727
"@ipld/dag-cbor": "^8.0.0",

packages/codegen/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cerc-io/codegen",
3-
"version": "0.2.98",
3+
"version": "0.2.98-patch.1",
44
"description": "Code generator",
55
"private": true,
66
"main": "index.js",
@@ -20,7 +20,7 @@
2020
},
2121
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
2222
"dependencies": {
23-
"@cerc-io/util": "^0.2.98",
23+
"@cerc-io/util": "^0.2.98-patch.1",
2424
"@graphql-tools/load-files": "^6.5.2",
2525
"@npmcli/package-json": "^5.0.0",
2626
"@poanet/solidity-flattener": "https://github.com/vulcanize/solidity-flattener.git",

packages/codegen/src/templates/package-template.handlebars

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
4242
"dependencies": {
4343
"@apollo/client": "^3.3.19",
44-
"@cerc-io/cli": "^0.2.98",
45-
"@cerc-io/ipld-eth-client": "^0.2.98",
46-
"@cerc-io/solidity-mapper": "^0.2.98",
47-
"@cerc-io/util": "^0.2.98",
44+
"@cerc-io/cli": "^0.2.98-patch.1",
45+
"@cerc-io/ipld-eth-client": "^0.2.98-patch.1",
46+
"@cerc-io/solidity-mapper": "^0.2.98-patch.1",
47+
"@cerc-io/util": "^0.2.98-patch.1",
4848
{{#if (subgraphPath)}}
49-
"@cerc-io/graph-node": "^0.2.98",
49+
"@cerc-io/graph-node": "^0.2.98-patch.1",
5050
{{/if}}
5151
"@ethersproject/providers": "^5.4.4",
5252
"debug": "^4.3.1",

packages/graph-node/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "@cerc-io/graph-node",
3-
"version": "0.2.98",
3+
"version": "0.2.98-patch.1",
44
"main": "dist/index.js",
55
"license": "AGPL-3.0",
66
"devDependencies": {
7-
"@cerc-io/solidity-mapper": "^0.2.98",
7+
"@cerc-io/solidity-mapper": "^0.2.98-patch.1",
88
"@ethersproject/providers": "^5.4.4",
99
"@graphprotocol/graph-ts": "^0.22.0",
1010
"@nomiclabs/hardhat-ethers": "^2.0.2",
@@ -51,9 +51,9 @@
5151
"dependencies": {
5252
"@apollo/client": "^3.3.19",
5353
"@cerc-io/assemblyscript": "0.19.10-watcher-ts-0.1.2",
54-
"@cerc-io/cache": "^0.2.98",
55-
"@cerc-io/ipld-eth-client": "^0.2.98",
56-
"@cerc-io/util": "^0.2.98",
54+
"@cerc-io/cache": "^0.2.98-patch.1",
55+
"@cerc-io/ipld-eth-client": "^0.2.98-patch.1",
56+
"@cerc-io/util": "^0.2.98-patch.1",
5757
"@types/json-diff": "^0.5.2",
5858
"@types/yargs": "^17.0.0",
5959
"bn.js": "^4.11.9",

packages/ipld-eth-client/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cerc-io/ipld-eth-client",
3-
"version": "0.2.98",
3+
"version": "0.2.98-patch.1",
44
"description": "IPLD ETH Client",
55
"main": "dist/index.js",
66
"scripts": {
@@ -20,8 +20,8 @@
2020
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
2121
"dependencies": {
2222
"@apollo/client": "^3.7.1",
23-
"@cerc-io/cache": "^0.2.98",
24-
"@cerc-io/util": "^0.2.98",
23+
"@cerc-io/cache": "^0.2.98-patch.1",
24+
"@cerc-io/util": "^0.2.98-patch.1",
2525
"cross-fetch": "^3.1.4",
2626
"debug": "^4.3.1",
2727
"ethers": "^5.4.4",

packages/peer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cerc-io/peer",
3-
"version": "0.2.98",
3+
"version": "0.2.98-patch.1",
44
"description": "libp2p module",
55
"main": "dist/index.js",
66
"exports": "./dist/index.js",

packages/rpc-eth-client/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cerc-io/rpc-eth-client",
3-
"version": "0.2.98",
3+
"version": "0.2.98-patch.1",
44
"description": "RPC ETH Client",
55
"main": "dist/index.js",
66
"scripts": {
@@ -19,9 +19,9 @@
1919
},
2020
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
2121
"dependencies": {
22-
"@cerc-io/cache": "^0.2.98",
23-
"@cerc-io/ipld-eth-client": "^0.2.98",
24-
"@cerc-io/util": "^0.2.98",
22+
"@cerc-io/cache": "^0.2.98-patch.1",
23+
"@cerc-io/ipld-eth-client": "^0.2.98-patch.1",
24+
"@cerc-io/util": "^0.2.98-patch.1",
2525
"chai": "^4.3.4",
2626
"ethers": "^5.4.4",
2727
"left-pad": "^1.3.0",

packages/rpc-eth-client/src/eth-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class EthClient implements EthClientInterface {
130130
parentHash: block.parentHash,
131131
timestamp: block.timestamp.toString(),
132132
stateRoot: this._provider.formatter.hash(rawBlock.stateRoot),
133-
td: this._provider.formatter.bigNumber(rawBlock.totalDifficulty).toString(),
133+
td: this._provider.formatter.bigNumber(rawBlock.totalDifficulty ?? 0).toString(),
134134
txRoot: this._provider.formatter.hash(rawBlock.transactionsRoot),
135135
receiptRoot: this._provider.formatter.hash(rawBlock.receiptsRoot)
136136
}
@@ -191,7 +191,7 @@ export class EthClient implements EthClientInterface {
191191
parentHash: this._provider.formatter.hash(rawBlock.parentHash),
192192
timestamp: this._provider.formatter.number(rawBlock.timestamp).toString(),
193193
stateRoot: this._provider.formatter.hash(rawBlock.stateRoot),
194-
td: this._provider.formatter.bigNumber(rawBlock.totalDifficulty).toString(),
194+
td: this._provider.formatter.bigNumber(rawBlock.totalDifficulty ?? 0).toString(),
195195
txRoot: this._provider.formatter.hash(rawBlock.transactionsRoot),
196196
receiptRoot: this._provider.formatter.hash(rawBlock.receiptsRoot),
197197
uncleRoot: this._provider.formatter.hash(rawBlock.sha3Uncles),

0 commit comments

Comments
 (0)