@@ -43,33 +43,19 @@ type newFulfillmentMetadata struct {
43
43
disableActiveScheduling bool
44
44
}
45
45
46
- // BaseActionHandler is a base interface for operation-specific action handlers
47
- //
48
- // Note: Action handlers should load all required state on initialization to
49
- // avoid duplicated work across interface method calls.
50
- type BaseActionHandler interface {
51
- // GetServerParameter gets the server parameter for the action within the context
52
- // of the intent.
53
- GetServerParameter () * transactionpb.ServerParameter
54
-
55
- // OnSaveToDB is a callback when the action is being saved to the DB
56
- // within the scope of a DB transaction. Additional supporting DB records
57
- // (ie. not the action or fulfillment records) relevant to the action should
58
- // be saved here.
59
- OnSaveToDB (ctx context.Context ) error
60
- }
61
-
62
46
// CreateActionHandler is an interface for creating new actions
63
47
type CreateActionHandler interface {
64
- BaseActionHandler
65
-
66
48
// FulfillmentCount returns the total number of fulfillments that
67
49
// will be created for the action.
68
50
FulfillmentCount () int
69
51
70
52
// PopulateMetadata populates action metadata into the provided record
71
53
PopulateMetadata (actionRecord * action.Record ) error
72
54
55
+ // GetServerParameter gets the server parameter for the action within the context
56
+ // of the intent.
57
+ GetServerParameter () * transactionpb.ServerParameter
58
+
73
59
// RequiresNonce determines whether a nonce should be acquired for the
74
60
// fulfillment being created. This should be true whenever a virtual
75
61
// instruction needs to be signed by the client.
@@ -81,22 +67,12 @@ type CreateActionHandler interface {
81
67
nonce * common.Account ,
82
68
bh solana.Blockhash ,
83
69
) (* newFulfillmentMetadata , error )
84
- }
85
-
86
- // UpgradeActionHandler is an interface for upgrading existing actions. It's
87
- // assumed we'll only be upgrading a single fulfillment.
88
- type UpgradeActionHandler interface {
89
- BaseActionHandler
90
70
91
- // GetFulfillmentBeingUpgraded gets the original fulfillment that's being
92
- // upgraded.
93
- GetFulfillmentBeingUpgraded () * fulfillment.Record
94
-
95
- // GetFulfillmentMetadata gets upgraded fulfillment metadata
96
- GetFulfillmentMetadata (
97
- nonce * common.Account ,
98
- bh solana.Blockhash ,
99
- ) (* newFulfillmentMetadata , error )
71
+ // OnSaveToDB is a callback when the action is being saved to the DB
72
+ // within the scope of a DB transaction. Additional supporting DB records
73
+ // (ie. not the action or fulfillment records) relevant to the action should
74
+ // be saved here.
75
+ OnSaveToDB (ctx context.Context ) error
100
76
}
101
77
102
78
type OpenAccountActionHandler struct {
0 commit comments