Policies
Policies are rules that define how Swivell components behave in response to events.
{
"effect": "effect_forward",
"scope": "<channel id>",
"condition": "deposit.asset.symbol == 'USDT' && !deposit.asset.is_possible_spam",
"forward": {
"network": "solana",
"asset": "USDT",
"recipient": "your address"
}
}
Structure
Policy definitions have the following fields:
effect
effect
What should happen if the condition is met
condition
condition
Predicate that determines when this policy takes effect
scope
scope
ID of the resource to which the policy should apply
Effect parameters
forward
: defines where the deposit should be sent and what asset should be received
There are currently two effects:
effect_forward
: convert and forward the deposit to the specified asset and walleteffect_freeze
: hold the deposit at the channel and prevent funds from reaching your wallets
Updated about 2 months ago
What’s Next