Developers
Last updated
Last updated
All your contract needs is to inherit the function ITickerOperation::onValidatorTriggered
. Then, you connect your contract to your ticker and voila, you are hooked into the Heroglyph Protocol. The only thing missing is a validator using your ticker in their graffiti #<TICKER_NAME>
.
Presently, there is no fee for executing a ticker. That being said, there is a possibility that later on, heroglyph request each apps to pay a fixed fee for the execution.
There are two approaches to pay the fee, either deposit the ETH directly into your contract, or use a GasPool relationship.
If you create a GasPool, it must uses the IGasPool interface
There is a small fee to execute a LZ message, this fee must be paid by your protocol // contract, otherwise the lz message will revert.
To hook your contract, see Tickers
A graffiti can contain multiple tickers, meaning your contract can be called more than once from different sources (e.g., someone creating a cheap ticker and connect your contract to it).
Therefore, it's always advisable to protect your code if this behavior is not desired.
Heroglyphs ensures that the block number will never be lower than the previously executed block, but it cannot guarantee that all valid blocks are caught.
Heroglyphs is not designed for chance games or RNG (Random Number Generation). You should also avoid "Time-based" distribution token.
Heroglyphs processes blocks only at the end of an epoch and handles five blocks every two minutes. So, if a block is created at the start of an epoch, it will usually take about eleven hours for Heroglyphs to recognize it. If there are ten graffiti blocks in an epoch, it will take about four minutes to process all of them.
You don't permanently own your ticker; you can lose it if your deposit reaches zero, or if someone decides to buy it at your price. Either way, keep in mind that you can lose your ticker, which will require obtaining a new one and migrating the validators.
If your product offers significant advantages to the ecosystem, please contact the Heroglyphs team. We can create a Ticker Immune to those systems for a period of time.