feat: process brc20 states

This commit is contained in:
Gaze
2024-06-09 16:29:00 +07:00
parent 132dcde715
commit 2ae5b0835d
2 changed files with 4 additions and 2 deletions

View File

@@ -354,7 +354,7 @@ func (p *Processor) updateInscriptionLocation(ctx context.Context, newSatPoint o
Cursed: origin.Cursed,
CursedForBRC20: origin.CursedForBRC20,
CreatedAt: blockHeader.Timestamp,
CreatedAtHeight: uint64(tx.BlockHeight),
CreatedAtHeight: uint64(blockHeader.Height),
Inscription: origin.Inscription,
TransferCount: 1, // count inscription as first transfer
}

View File

@@ -49,7 +49,9 @@ func (p *Processor) Process(ctx context.Context, blocks []*types.Block) error {
return int(t1.NewSatPoint.Offset) - int(t2.NewSatPoint.Offset)
})
// TODO: process brc20 states
if err := p.processBRC20States(ctx, p.newInscriptionTransfers, block.Header); err != nil {
return errors.Wrap(err, "failed to process brc20 states")
}
if err := p.flushBlock(ctx, block.Header); err != nil {
return errors.Wrap(err, "failed to flush block")