-
Notifications
You must be signed in to change notification settings - Fork 1.6k
XLS-68: Sponsor #5887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
XLS-68: Sponsor #5887
Changes from 145 commits
cad305a
43c16f3
5b9c767
d40f8cc
198ed72
a798c60
f0addd8
67bdd09
0bddc95
6e01f23
abd8620
5e65813
2071b39
9ff71aa
02d8f9f
e589b71
8e895a3
4eea76c
6aa0331
4abd94e
1cdf7bb
110b222
20bce64
6c0732c
2a27280
5ac7bbf
759f843
2afe570
a43ae9a
89af817
453fd23
cc5e063
5dc63b6
613fe48
f7e1d4b
fed56b2
d494738
6eb453f
ea72198
aeaf679
ab4ac64
3501309
c4b798e
9694de9
0c93bd6
b78885d
cc4b07d
ec11763
71b81b7
699297f
d5a1314
e82c300
dbbfc13
b096662
75aaeb5
1ee2508
5b64ff0
bc1ef1e
59c3d5b
4126d53
ee385e9
101b70f
bc71d9c
d597726
8d32b0f
1441abc
9df0ad6
28c5cad
a6b0eff
32cc782
754f597
7f922c4
a65cf6e
d8dc000
5d597e3
2337d34
4fe7e87
d0bcca6
965ecd3
774917d
b4188a8
3e6d6c6
13145f6
297083e
cd62f7f
e03c7a9
fbf403a
a49cb91
3f96735
af9d91b
9d1b5eb
b5db596
c38cb90
7f0a940
a9629ae
d96998c
e49d338
f5e2195
ea29fe5
0f36de8
198f3f8
163a2ac
2813fea
cf03c4c
edddf3f
dc325a9
0791ca1
82b146b
1e8f6ce
ffb5382
f88e964
ec05613
1bc5a1b
f885f02
5b91d81
9e65dba
c321e10
3568df4
c3e5bcf
52ae31b
204138f
f333dd1
1823d70
990627f
ce8049a
88e870b
87718bd
8be44c7
ab1de45
5f385e0
6576823
d7ab1b4
c0de722
5155a94
4cd8d0d
175a2df
7cdaa24
40cf599
8f8fc03
0a41002
4a205eb
527d7bb
8d24afe
4e87de7
d390bc7
f820908
37f4ea9
49c5269
fe07547
e1aee43
446681d
392a913
d1d613d
c1e1be5
686f945
bf4fa37
f6d79f7
9859ba8
9cde57d
fe5fab0
2fd8e1b
dcfcb1f
293394f
178bb8f
f86b255
4a91351
1ad6dd1
062ece3
9961887
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -216,6 +216,7 @@ words: | |
| - sles | ||
| - soci | ||
| - socidb | ||
| - sponsee | ||
| - sslws | ||
| - statsd | ||
| - STATSDCOLLECTOR | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #ifndef XRPL_PROTOCOL_SPONSOR_H_INCLUDED | ||
| #define XRPL_PROTOCOL_SPONSOR_H_INCLUDED | ||
|
|
||
| #include <xrpl/protocol/AccountID.h> | ||
tequdev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #include <xrpl/protocol/HashPrefix.h> | ||
| #include <xrpl/protocol/STVector256.h> | ||
| #include <xrpl/protocol/Serializer.h> | ||
|
|
||
| namespace xrpl { | ||
|
|
||
| inline void | ||
| addSerializeSponsorData(Serializer& msg, AccountID const& sponsorID, std::uint32_t const& flags) | ||
| { | ||
| msg.addBitString(sponsorID); | ||
| msg.add32(flags); | ||
| } | ||
|
|
||
| } // namespace xrpl | ||
|
|
||
| #endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,11 @@ constexpr std::uint32_t tfInnerBatchTxn = 0x40000000; | |
| constexpr std::uint32_t tfUniversal = tfFullyCanonicalSig | tfInnerBatchTxn; | ||
| constexpr std::uint32_t tfUniversalMask = ~tfUniversal; | ||
|
|
||
| // Sponsor flags (Global): | ||
| constexpr std::uint32_t tfSponsorFee = 0x00000001; | ||
| constexpr std::uint32_t tfSponsorReserve = 0x00000002; | ||
| constexpr std::uint32_t tfSponsorMask = ~(tfSponsorFee | tfSponsorReserve); | ||
|
|
||
| // AccountSet flags: | ||
| constexpr std::uint32_t tfRequireDestTag = 0x00010000; | ||
| constexpr std::uint32_t tfOptionalDestTag = 0x00020000; | ||
|
|
@@ -74,6 +79,7 @@ constexpr std::uint32_t asfDisallowIncomingPayChan = 14; | |
| constexpr std::uint32_t asfDisallowIncomingTrustline = 15; | ||
| constexpr std::uint32_t asfAllowTrustLineClawback = 16; | ||
| constexpr std::uint32_t asfAllowTrustLineLocking = 17; | ||
| constexpr std::uint32_t asfDisallowIncomingSponsor = 19; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be 18?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. setting this to 19 because
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| // OfferCreate flags: | ||
| constexpr std::uint32_t tfPassive = 0x00010000; | ||
|
|
@@ -88,8 +94,9 @@ constexpr std::uint32_t tfOfferCreateMask = | |
| constexpr std::uint32_t tfNoRippleDirect = 0x00010000; | ||
| constexpr std::uint32_t tfPartialPayment = 0x00020000; | ||
| constexpr std::uint32_t tfLimitQuality = 0x00040000; | ||
| constexpr std::uint32_t tfSponsorCreatedAccount = 0x00080000; | ||
| constexpr std::uint32_t tfPaymentMask = | ||
| ~(tfUniversal | tfPartialPayment | tfLimitQuality | tfNoRippleDirect); | ||
| ~(tfUniversal | tfPartialPayment | tfLimitQuality | tfNoRippleDirect | tfSponsorCreatedAccount); | ||
| constexpr std::uint32_t tfMPTPaymentMask = ~(tfUniversal | tfPartialPayment); | ||
|
|
||
| // TrustSet flags: | ||
|
|
@@ -292,6 +299,15 @@ constexpr std::uint32_t const tfLoanImpair = 0x00020000; | |
| constexpr std::uint32_t const tfLoanUnimpair = 0x00040000; | ||
| constexpr std::uint32_t const tfLoanManageMask = ~(tfUniversal | tfLoanDefault | tfLoanImpair | tfLoanUnimpair); | ||
|
|
||
| // SponsorshipSet flags: | ||
| constexpr std::uint32_t tfSponsorshipSetRequireSignForFee = 0x00010000; | ||
| constexpr std::uint32_t tfSponsorshipClearRequireSignForFee = 0x00020000; | ||
| constexpr std::uint32_t tfSponsorshipSetRequireSignForReserve = 0x00040000; | ||
| constexpr std::uint32_t tfSponsorshipClearRequireSignForReserve = 0x00080000; | ||
| constexpr std::uint32_t tfDeleteObject = 0x00100000; | ||
| constexpr std::uint32_t tfSponsorshipSetMask = ~(tfUniversal | tfSponsorshipSetRequireSignForFee | tfSponsorshipClearRequireSignForFee | tfSponsorshipSetRequireSignForReserve | tfSponsorshipClearRequireSignForReserve | tfDeleteObject); | ||
| constexpr std::uint32_t tfSponsorshipSetPermissionMask = ~(tfUniversal | tfSponsorshipSetRequireSignForFee | tfSponsorshipSetRequireSignForReserve); | ||
|
|
||
| // clang-format on | ||
|
|
||
| } // namespace xrpl | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to double check if we still want to add this flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mvadari