When creating more advanced code and logic it can be important to listen internally to the changes happening inside the DappHero-Core engine. To help do this, we have provided a number of event listeners to help you react to internal changes to DappHero Core processes.
All listeners take a callback and will be triggered on an event change internally.
To use these, first listen for the event that signals DappHero has loaded, and then you can listen for DappHero specific events.
<script> document.addEventListener( "dappHeroConfigLoaded", ({detail: dappHero}) => { // Inside here you can listen to any event you want // dappHero.listenToSmartContractBlockchainEvent(data => { // console.log("The blockChain Events: ", data) // })} );</script>
List of Listeners:
Smart Contracts
listenToTransactionStatusChange()
Fires for each step in the process of preparing and submitting a transaction to the blockchain.