File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ const (
2323 // autoIn is the label used for loop in swaps that are automatically
2424 // dispatched.
2525 autoIn = "autoloop-in"
26+
27+ // easyAutoOut is the label used for easy loop out swaps that are
28+ // automatically dispatched.
29+ easyAutoOut = "easy-autoloop-out"
30+
31+ // easyAutoIn is the label used for easy loop in swaps that are
32+ // automatically dispatched.
33+ easyAutoIn = "easy-autoloop-in"
2634)
2735
2836var (
@@ -44,6 +52,16 @@ func AutoloopLabel(swapType swap.Type) string {
4452 return fmt .Sprintf ("%v: %v" , Reserved , autoIn )
4553}
4654
55+ // EasyAutoloopLabel returns a label with the reserved prefix that identifies
56+ // automatically dispatched swaps depending on the type of swap being executed.
57+ func EasyAutoloopLabel (swapType swap.Type ) string {
58+ if swapType == swap .TypeOut {
59+ return fmt .Sprintf ("%v: %v" , Reserved , easyAutoOut )
60+ }
61+
62+ return fmt .Sprintf ("%v: %v" , Reserved , easyAutoIn )
63+ }
64+
4765// Validate checks that a label is of appropriate length and is not in our list
4866// of reserved labels.
4967func Validate (label string ) error {
You can’t perform that action at this time.
0 commit comments