How it works?
Phidippides relies on tickets to keep track of transactions. The idea is to force the user notify your service, instead of your service constantly checking for new transactions. This way, you can scale your service to handle thousands of transactions per second, without worrying about the load on your database.
Architecture
Ticket
A ticket is a unique identifier that is attached to a transaction. A ticket is generated on chain by our smart contract using the targetted smart contract address, your address and the block number. A ticket can be redeemed only once, and is valid to notify one transaction.
Notifying a transaction
Once your transaction is mined, you can notify Phidippides by sending a POST request with the transaction hash and the ticket. Phidippides will then verify the ticket and the transaction hash, and if everything is correct, it will notify registered services.
Registering a service
To register a service, you have to call AddListener on the Phidippides smart contract with the contract address and the webhook URL. You don't need to notify our off-chain backend, it will automatically fetch the new service.