Improvements to the aggregation function for ERC721 token transfer logs:
- We used to roughly determine the holding period of someone owning a type of token in the aggregation function. For example, if someone held token:0 from time:0 to time:2, and then token:1 from time:3 to time:4, for simplicity, we just said that the person then held tokens between time:0 and time:4. This is is obviously imprecise.
- We have now adjusted the aggregation function as to precisely list the token holding period as a unix time stamp on a per-token basis.
{
//...
tokens: {
"5": [{
start: 0,
end: 2
},{
start: 3,
end: 4
}]
"6": [{
start: 10
}]
},
//...
}
As you can see, we're now keeping track of every token precisely for how long it has been in the address's possession. One suboptimal result that we're still releasing in this version is inter-block token transfer tracking. The following can appear as a user's token holdings:
{
//...
tokens: {
"5": [{
start: 0,
end: 2
},{
start: 2,
end: 3
}]
},
//...
}
Here, the user did a rapid transfers of the token:5 at time:2. Maybe they sent the token to another user, and the other use immediately sent the token back in the same block. We call this type of interaction "inter-block transfers."
While this output is ugly, it is strictly speaking not wrong. As the runtime complexity and readability of the code worsened when trying to fix this cosmetic issue, I left it as is shown above.
- Add entire transaction data to output of extractor
- Add aggregate function and export in loader
- Add
args.includeValue
to extractor strategy. This downloads the transaction itself and adds thevalue
field to the pipeline's output usingeth_getTransactionByHash
.
- Add
args.includeTimestamp
to extractor strategy. Now Ethereum block logs' timestamps can be downloaded additionally and they'll be available in the log atresults[].block.timestamp
as a hexa-decimal value.
- Update peerDependency @attestate/crawler to 0.6.x
- Stop using
env.VARIABLES
and instead rely on passed-in variables from the crawler's lifecycle usingenvironment
parameter - Add event log parsing to transformer. Using
args.inputs
a list of inputs can be passed to decode an event log into Solidity types.
- NOTE: This version is released with the new @attestate/[email protected] which features a bunch of changes on the lifecycle API level
- (breaking) All input signatures have been adjusted to new lifecycle API interface.
- A new state module has been added to track the lastest local and remote state.
- For storing ordered values into the LMDB, the encoding was adjusted to store un-prefixed hex strings that are padded (for LMDB's ordering to work properly).
- All docs have been updated, but docs for the state/coordinator module are still TBD.
- Implement
loader
module for LMDB key-generation
- For
extractor.init
, we addstepSize
as an input parameter to automate the distance betweenfromBlock
andtoBlock
- Extraction module: Add
address
andtopics
filter - Transformation module: Change
topics0
,topics1
andtopics2
to an array - Add more documentation
- (breaking) Fix including
transformer.mjs
andlogger.mjs
files
- Initial release