Commit 37fed98
authored
Lean into Transfer events with data as a map (#1534)
### What
Remove the `token::publish_transfer_event` function.
Rename Transfer to TransferLegacy.
Rename TransferMuxed to Transfer.
### Why
To encourage developers publishing the newer and easier to extend
Transfer event.
While it's true that the Stellar Asset Contract, for largely legacy
reasons, continues to publish a `transfer` event with the amount as the
data, there's no reason for the SDK to encourage other token
implementations to do the same.
Rather than giving developers a function to call to publish the transfer
event across these two different data forms, we should just point them
to publishing the newer form that is extendable.
### Merging
This PR is intended to merge to `main` after #1533. It is marked as a
draft PR until #1533 is merged.1 parent 6f324d8 commit 37fed98
9 files changed
Lines changed: 195 additions & 68 deletions
File tree
- soroban-sdk
- src
- _migrating
- tests
- test_snapshots/tests/token_events
- soroban-token-sdk/src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 30 | + | |
| 31 | + | |
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
| |||
55 | 51 | | |
56 | 52 | | |
57 | 53 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
120 | 164 | | |
121 | 165 | | |
122 | 166 | | |
123 | 167 | | |
124 | 168 | | |
125 | 169 | | |
126 | 170 | | |
127 | | - | |
| 171 | + | |
128 | 172 | | |
129 | 173 | | |
130 | | - | |
| 174 | + | |
131 | 175 | | |
132 | 176 | | |
133 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
152 | 145 | | |
153 | 146 | | |
154 | 147 | | |
| |||
249 | 242 | | |
250 | 243 | | |
251 | 244 | | |
252 | | - | |
| 245 | + | |
253 | 246 | | |
254 | 247 | | |
255 | 248 | | |
| |||
258 | 251 | | |
259 | 252 | | |
260 | 253 | | |
261 | | - | |
| 254 | + | |
262 | 255 | | |
263 | 256 | | |
264 | 257 | | |
265 | 258 | | |
266 | | - | |
| 259 | + | |
267 | 260 | | |
268 | 261 | | |
269 | 262 | | |
| |||
288 | 281 | | |
289 | 282 | | |
290 | 283 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | 284 | | |
316 | 285 | | |
317 | 286 | | |
| |||
328 | 297 | | |
329 | 298 | | |
330 | 299 | | |
| 300 | + | |
331 | 301 | | |
332 | | - | |
333 | 302 | | |
334 | 303 | | |
335 | 304 | | |
336 | 305 | | |
337 | 306 | | |
338 | | - | |
| 307 | + | |
339 | 308 | | |
340 | 309 | | |
341 | 310 | | |
| |||
427 | 396 | | |
428 | 397 | | |
429 | 398 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
| 399 | + | |
435 | 400 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
| 401 | + | |
440 | 402 | | |
441 | 403 | | |
442 | 404 | | |
| |||
633 | 595 | | |
634 | 596 | | |
635 | 597 | | |
| 598 | + | |
636 | 599 | | |
637 | | - | |
638 | 600 | | |
639 | 601 | | |
640 | 602 | | |
641 | 603 | | |
642 | 604 | | |
643 | 605 | | |
644 | 606 | | |
645 | | - | |
| 607 | + | |
646 | 608 | | |
647 | 609 | | |
648 | 610 | | |
| |||
0 commit comments