Commit be3c91d
authored
feat: allow relayers to submit deposit transactions (#217)
## Summary
This PR enables transaction relayers to submit deposit transactions on
behalf of users by removing the restriction that the permit recipient
must be the message sender.
## Changes
- Update `Payments` contract to allow relayers to submit permit signed
by a user
- Add tests
It'll improve UX by cutting down signatures from two to one as relayer /
operators can accept permit and submit on users behalf.
Demo (deployment address: `0xa883569439A2E11482197d93526d64e598089DeD`):
1. Generate permit:
https://eip2612.hashchainprotocol.com/generate-permit.html
2. Submit permit value + token address + signer address at
https://eip2612.hashchainprotocol.com/
Closes #1461 parent f9b8844 commit be3c91d
File tree
5 files changed
+73
-16
lines changed- src
- test
- helpers
5 files changed
+73
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
| 497 | + | |
504 | 498 | | |
505 | 499 | | |
506 | 500 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
62 | 89 | | |
63 | 90 | | |
64 | 91 | | |
| |||
241 | 268 | | |
242 | 269 | | |
243 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
244 | 307 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
841 | | - | |
| 840 | + | |
| 841 | + | |
842 | 842 | | |
843 | 843 | | |
844 | | - | |
845 | | - | |
| 844 | + | |
| 845 | + | |
846 | 846 | | |
847 | | - | |
848 | | - | |
849 | | - | |
| 847 | + | |
850 | 848 | | |
851 | 849 | | |
852 | 850 | | |
| |||
0 commit comments