IntroducingHow to generate parsiq wallet triggers for CryptoPunks
In this post we create three parsiq platform smart Triggers that respond to CryptoPunks directly related on-chain events and follow custom logic to deliver all necessary transaction information about the price action.
Offers for Sale of the limited CryptoPunks collection are particularly vital to traders and collectors. New listings might prove to be an opportunity to profit from the immediate purchase. Meanwhile for traders new sales provide indicators for the demand and supply within the collections as well as for the market, in general.
Cryptopunks is the NFT collection of 10000 uniquely generated characters. The collection has a highest market capitalization and market volume as of November 4th 2021.
We created parsiq account with an Empty project instead of a template as it allows us to edit the trigger code.
Next, to monitor the NFT collection we added its contract ABI in the User stream on parsiq platform.
We select the ABI straight from the page and export into RAW/TEXT format and upload to parsiq platform.
Following data from Etherscan we choose three most frequent events so that we could use them with ParsiQL to create a trigger.
In our instance, we added the events: PunkOffered, PunkBidEntered and PunkBidWithdrawn.
Back in our Project we also included transports to get the necessary data. There are four options: Web, Discord, Telegram and Google Sheets. In this project we implemented Web, Telegram and Google Sheets transports.
As we implemented the necessary details we combine them as a final product. In our Project we create triggers for each of the events with similar ParsiQL code, deploy them and add transports. Here are some details on the code and configuration:
We get immediate notifications through a telegram bot in the private channel.
By using ngrok, we receive the post requests from the triggers.
For two out of three trigger we also post the data back on the Platform to update the User Tables with NodeJs.
var express = require('express')
var request = require('request')