This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
generated from subsquid-labs/squid-substrate-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Handler to mark offers as expired. #13
Comments
I was ahead of time ;D |
👋 |
9 tasks
This can be easily hacked with similar approach as I hacked metadata updater If you need some SQL magic happy to help |
17 tasks
Basically this handler should be called every 5 min Sadly I do not handle expire time in dates as this is very variable thing const OFFER_STATUS_ID = '2';
const OFFER_DELAY_MIN = 5;
export async function updateOfferStatus(block: bigint, store: Store): Promise<void> {
} UPDATE offer SET status = 'EXPIRED' WHERE expiration <= $1
RETURNING id; |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The task:
expires
lower or equal to current block number.status
asEXPIRED
There are basically two options:
Do it on action of the NFT (LIST, ACCEPT_OFFER, SEND) - per particular NFT
Do it automatically every
100
blocks (//5 blocks/min
, so every 20 min) on all datasetMay @dzhelezov can drop a comment
The text was updated successfully, but these errors were encountered: