Skip to content

Commit

Permalink
chore: upgrade to latest checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekhmet committed May 10, 2024
1 parent adc087f commit c388f44
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 48 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"prettier": "@snapshot-labs/prettier-config",
"dependencies": {
"@snapshot-labs/checkpoint": "^0.1.0-beta.26",
"@snapshot-labs/checkpoint": "^0.1.0-beta.34",
"@types/node": "^18.11.6",
"cors": "^2.8.5",
"dotenv": "^16.0.1",
Expand Down
83 changes: 47 additions & 36 deletions src/abis/Poster.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,63 @@
[
{
"data": [
"name": "Poster",
"type": "impl",
"interface_name": "starknet_poster::poster::IPoster"
},
{
"name": "starknet_poster::poster::IPoster",
"type": "interface",
"items": [
{
"name": "post",
"type": "function",
"inputs": [
{
"name": "content",
"type": "core::array::Array::<core::felt252>"
},
{
"name": "tag",
"type": "core::array::Array::<core::felt252>"
}
],
"outputs": [],
"state_mutability": "external"
}
]
},
{
"kind": "struct",
"name": "starknet_poster::poster::Poster::NewPost",
"type": "event",
"members": [
{
"kind": "key",
"name": "address",
"type": "felt"
},
{
"name": "content_len",
"type": "felt"
"type": "core::starknet::contract_address::ContractAddress"
},
{
"kind": "data",
"name": "content",
"type": "felt*"
},
{
"name": "tag_len",
"type": "felt"
"type": "core::array::Array::<core::felt252>"
},
{
"kind": "data",
"name": "tag",
"type": "felt*"
"type": "core::array::Array::<core::felt252>"
}
],
"keys": [],
"name": "new_post",
"type": "event"
]
},
{
"name": "post",
"type": "function",
"inputs": [
{
"name": "content_len",
"type": "felt"
},
{
"name": "content",
"type": "felt*"
},
{
"name": "tag_len",
"type": "felt"
},
{
"name": "tag",
"type": "felt*"
"kind": "enum",
"name": "starknet_poster::poster::Poster::Event",
"type": "event",
"variants": [
{
"kind": "nested",
"name": "NewPost",
"type": "starknet_poster::poster::Poster::NewPost"
}
],
"outputs": []
]
}
]
4 changes: 2 additions & 2 deletions src/checkpoints.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"contract": "0x04d10712e72b971262f5df09506bbdbdd7f729724030fa909e8c8e7ac2fd0012",
"blocks": [185778, 185780, 220016, 220138, 221984]
"contract": "0x03aa7630a4f9c5108bf3cd1910c7d45404cba865fc0fc0756bf9eedc073a98a9",
"blocks": [65308, 65309]
}
]
10 changes: 5 additions & 5 deletions src/config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"network_node_url": "https://starknet-goerli.infura.io/v3/c82b1cf516984b599108487a1b6481c4",
"optimistic_indexing": true,
"network_node_url": "https://starknet-sepolia.infura.io/v3/c82b1cf516984b599108487a1b6481c4",
"optimistic_indexing": false,
"sources": [
{
"contract": "0x04d10712e72b971262f5df09506bbdbdd7f729724030fa909e8c8e7ac2fd0012",
"start": 185778,
"contract": "0x03aa7630a4f9c5108bf3cd1910c7d45404cba865fc0fc0756bf9eedc073a98a9",
"start": 65137,
"abi": "Poster",
"events": [
{
"name": "new_post",
"name": "NewPost",
"fn": "handleNewPost"
}
]
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const schema = fs.readFileSync(schemaFile, 'utf8');
const checkpoint = new Checkpoint(config, writers, schema, {
logLevel: LogLevel.Info,
prettifyLogs: true,
fetchInterval: 15000,
abis: {
Poster
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@
resolved "https://registry.yarnpkg.com/@rometools/cli-win32-x64/-/cli-win32-x64-12.1.3.tgz#b4f53491d2ca8f1234b3613b7cc73418ad8d76bb"
integrity sha512-yHSKYidqJMV9nADqg78GYA+cZ0hS1twANAjiFibQdXj9aGzD+s/IzIFEIi/U/OBLvWYg/SCw0QVozi2vTlKFDQ==

"@snapshot-labs/checkpoint@^0.1.0-beta.26":
version "0.1.0-beta.26"
resolved "https://registry.yarnpkg.com/@snapshot-labs/checkpoint/-/checkpoint-0.1.0-beta.26.tgz#e4a5f21222768c1aa7ae5cf3b9dbb4267dc562d8"
integrity sha512-Y4IkP+eIZDuWe/JcjIhM2oOZMWxziRjodaY1edYbpOuQQOb4eppNCq9kZJUw7jUkm91LEvMEVLrIzxDiFX7l9Q==
"@snapshot-labs/checkpoint@^0.1.0-beta.34":
version "0.1.0-beta.34"
resolved "https://registry.yarnpkg.com/@snapshot-labs/checkpoint/-/checkpoint-0.1.0-beta.34.tgz#ce7ccb988ff008a2ca827848aff852ee9a4904b9"
integrity sha512-EZ0enCmL44fc8gLl+Kxf8CEjeEtXi/wWzrdSvGDY4aS+PHV/TTkeg46vTXkkwmIOuPg6AgF2CRoqY8xa4Wm1Hw==
dependencies:
"@graphql-tools/schema" "^8.5.1"
bluebird "^3.7.2"
Expand Down

0 comments on commit c388f44

Please sign in to comment.