-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoperation-create-manage-offer-request.x
56 lines (46 loc) · 1.47 KB
/
operation-create-manage-offer-request.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
%#include "xdr/reviewable-request-manage-offer.h"
%#include "xdr/operation-manage-offer.h"
namespace stellar
{
struct CreateManageOfferRequestOp
{
//: ManageOfferRequest details
ManageOfferRequest request;
//: (optional) Bit mask whose flags must be cleared in order for CreateSale request to be approved, which will be used by key sale_create_tasks:<asset_code>
//: instead of key-value
uint32* allTasks;
//: reserved for future extension
EmptyExt ext;
};
enum CreateManageOfferRequestResultCode
{
//: CreateManageOfferRequestOp was successfully applied
SUCCESS = 0,
//: Offer is invalid
INVALID_OFFER = -1,
//: Tasks for the manage offer request were neither provided in the request nor loaded through KeyValue
MANAGE_OFFER_TASKS_NOT_FOUND = -2,
//: Creator details are not in a valid JSON format
INVALID_CREATOR_DETAILS = -3
};
struct CreateManagerOfferRequestSuccessResult
{
//: ID of the ManageOfferRequest
uint64 requestID;
//: Indicates whether or not the manage offer request was auto approved
bool fulfilled;
//: Result of manage offer application
ManageOfferResult* manageOfferResult;
//: Reserved for future extension
EmptyExt ext;
};
union CreateManageOfferRequestResult switch (CreateManageOfferRequestResultCode code)
{
case SUCCESS:
CreateManagerOfferRequestSuccessResult success;
case INVALID_OFFER:
ManageOfferResultCode manageOfferCode;
default:
void;
};
}