public class AccountBalanceNotifier extends AbstractContract<java.lang.Object,java.lang.Object>
Configuration: "slackWebHookUrl" - points to web-hook of slack channel for notifications "limits" - array of minimum balance limits
Here is contract runner config example:
"AccountBalanceNotifier": { "slackWebHookUrl": "", "limits": [{ "accountRs": "ARDOR-XK4R-7VJU-6EQG-7R335", "type": "coin", "id": "ARDR", "minBalance": 10.0, "refreshInterval": 1 },{ "accountRs": "ARDOR-E93F-7E8Z-BHJ8-A65RG", "type": "asset", "id": "123", "minBalance": 7.0, "refreshInterval": 3 }] }
Modifier and Type | Class and Description |
---|---|
static class |
AccountBalanceNotifier.HoldingType |
static class |
AccountBalanceNotifier.MinBalanceLimit |
static interface |
AccountBalanceNotifier.Parameters |
Constructor and Description |
---|
AccountBalanceNotifier() |
Modifier and Type | Method and Description |
---|---|
void |
init(InitializationContext context)
Contract initialization.
|
JO |
processBlock(BlockContext context) |
isDuplicate, processInvocation, processRequest, processTransaction, processVoucher
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
minProductVersion, shutdown
public void init(InitializationContext context)
Contract
Invoked once after loading the contract class, before any other callback. Use this callback to initialize long running services required by the contract.
context
- the contract contextpublic JO processBlock(BlockContext context)
processBlock
in interface Contract<java.lang.Object,java.lang.Object>
processBlock
in class AbstractContract<java.lang.Object,java.lang.Object>