visit
Ethereum is a decentralized blockchain network for running smart contracts. Let’s say you’ve created your masterpiece, but you need a way to signal the execution of events to your constituency. An example of this would be a network of investors that are awaiting the opening of your Cryptotoken crowdsale. It’s time to use the PubNub megaphone to tell everyone that your crowdsale has opened, in realtime.
The uses PubNub Functions to collect user data with , classify a customer’s use case with a machine learning API, and then submit an enriched alert. All of this functionality is triggered by one PubNub message. In this similar use case, PubNub can make your smart contract events powerful.
Here is the Node.js script that will commit the publish to PubNub’s network, which guarantees delivery in under a quarter of a second to your millions of patient investors.
You can check out the full for this project.
In order to get this example running, you need to input the path of the JSON file for your smart contract build in line 4. Next paste in your keys, and finally your contract’s address toward the bottom of the file. This code can be used in conjunction with the Crowdsalabe Token project mentioned earlier.
This connector opens the doors for PubNub Functions and Mobile Push Notifications to ensure that our constituency gets a text, email, push notification, and we can , all in an automated fashion.
Originally published at .