Socket
Book a DemoInstallSign in
Socket

@chainflip/processor

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainflip/processor

The codegen utility is very useful in times of network runtime upgrades. In such scenarios, things can break on our end as our backends rely heavily on the events emitted by the state-chain. This utility was written to help us spot new events as well as c

1.11.8
latest
Source
npmnpm
Version published
Weekly downloads
422
30.25%
Maintainers
2
Weekly downloads
 
Created
Source

Processor Codegen

The codegen utility is very useful in times of network runtime upgrades. In such scenarios, things can break on our end as our backends rely heavily on the events emitted by the state-chain. This utility was written to help us spot new events as well as changes in the schemas of the old events so to anticipate and be able to estimate/plan the work.

How to run

To be able to run the code generation tool, you first need to find out the new spec version of the network and the block hash at which it occured. Once you have these 2 pieces of information, you need to update the configuration file by adding the new spec verson together with the environment, like so:

{
  //...,
  "170": {
    "hash": "0xd9eeefdbd275bf7466b9d76c810a7ebfb1aab16a68301ee1ab605015c7295e95",
    "network": "backspin"
  }
}

We just specified that we want to run the codegen for spec version "170" (1.7.0) and the upgrade occured at block hash 0xd9eeefdbd275bf7466b9d76c810a7ebfb1aab16a68301ee1ab605015c7295e95 on the backspin (our devnet) environment.

Once this is done, save the file and run the script.

./scripts/generate.ts

Voila! You should see the auto-generated code inserted in the respective places.

How to re-run for the same version

  • Remove the packages/chainspec/metadata/{version}.scale file.
  • Remove the packages/processor/generated/types-{version}.json file.
  • Remove the packages/processor/generated/{version} folder.
  • Make sure the block hash for the specific version we are targeting is correct.
  • Run ./scripts/generate.ts

FAQs

Package last updated on 03 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.