Skip to content

Repository containing logic to parse data from the Energy web Chain

Notifications You must be signed in to change notification settings

polyphene/ewc-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Energy Web Chain Data Parser

The script in this repository is used to parse events that happened over the Energy Web Chain. The goal here is to intersect the data to estimate the total value on RECs currently anchored on-chain and how much of it has been associated to a storage provider of the Filecoin network.

Parsed Events

The events we leverage to cross-reference the data are:

  • TransferSingle: When the transfer happens from the Zero address the event means that a Certificate (amount of value ordered by Protocol Labs) has been minted on-chain in the form of tokens. The value associated to these certificates represent the amount of energy ordered in Wh. See Certificate documentation.
  • RedemptionStatementSet: Event that links a Batch (group of Certificates.) to a given Redemption Statement CID. See Bi-directional documentation.
  • CertificateBatchMinted: Event that create a relation between multiple Certificates under a given batch ID, effectively linking Certificates to a Redemption Statement. See Batch documentation.
  • ClaimSingle: Event that represents the allocation of an amount of RECs from a Certificate to a storage provider of the Filecoin network. See Claiming documentation.

Run

npm run script

Warning

Currently, the only claims data that can be decoded are the ones from certificates collections 1 & 2. However, those collections are not associated to any batch, thus not appearing in CSV.

Even for decoded collections we can only retrieve claim data that makes little sense. Feel free to consult src/claims.csv for more information.

About

Repository containing logic to parse data from the Energy web Chain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published