Develop a PoC "SingleRequestProxy" payment smart contract that emits the paymentReference event in the receive() function
Definition of Done
- [x] RequestNetwork/requestNetwork#1394
- [ ] RequestNetwork/requestNetwork#1395
- [ ] RequestNetwork/private-issues#135
- [ ] RequestNetwork/requestNetwork#1396
- [x] RequestNetwork/payments-subgraph#94
- [ ] RequestNetwork/requestNetwork#1458
- [ ] RequestNetwork/docs.request.network#50
- [ ] Audit the SingleRequestProxyFactory and resulting NativeSingleRequestProxy and ERC20SingleRequestProxy
- [ ] Build it into Request Invoicing
- [ ] Test it with a builder
Motivation
- RequestNetwork/requestNetwork#1159
- Let users pay a request from a Centralized Exchange (CEX).
- Let users pay a request without connecting their wallet to a Dapp.
Proposed Solution
Reference: https://miro.com/app/board/uXjVM2Pf758=/?share_link_id=761216115297
Factory Contract can spawn new instances of SingleRequestProxy.
another interesting use case for this : exchanges! They don't support smart contract calls, so cannot interract with the existing proxies.
It seems important that, once used, the "one time proxy" rejects any incoming transfer
It seems important that, once used, the "one time proxy" rejects any incoming transfer
@benjlevesque I'm not so sure. I think we'd still want to support partial payments. And since the expected amount can change (via increase/decreaseExpectedAmount) I don't think we can store the expected amount on the contract.
Despite the familiarity of the name "One Time Proxy", I don't think we should call it that, because we support partial payments meaning that a given proxy contract can be paid more than once. I prefer the name "SingleRequestProxy". I think it makes it clear that the Proxy is tied to a single request.