File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,17 @@ contract PaymentsGateway is Ownable, ReentrancyGuard {
207
207
return (recovered, valid);
208
208
}
209
209
210
+
211
+ /**
212
+ The purpose of startTransfer is to be the entrypoint for all thirdweb pay swap / bridge
213
+ transactions. This function will allow us to standardize the logging and fee splitting across all providers.
214
+
215
+ Requirements:
216
+ 1. Verify the parameters are the same parameters sent from thirdweb pay service by requiring a backend signature
217
+ 2. Log transfer start allowing us to link onchain and offchain data
218
+ 3. distribute the fees to all the payees (thirdweb, developer, swap provider??)
219
+ 4. forward the user funds to the swap provider (forwardAddress)
220
+ */
210
221
function startTransfer (
211
222
bytes32 clientId ,
212
223
bytes32 transactionId ,
@@ -266,6 +277,16 @@ contract PaymentsGateway is Ownable, ReentrancyGuard {
266
277
require (success, "Failed to forward " );
267
278
}
268
279
280
+ /**
281
+ The purpose of endTransfer is to provide a forwarding contract call
282
+ on the destination chain. For LiFi (swap provider), they can only guarantee the toAmount
283
+ if we use a contract call. This allows us to call the endTransfer function and forward the
284
+ funds to the end user.
285
+
286
+ Requirements:
287
+ 1. Log the transfer end
288
+ 2. forward the user funds
289
+ */
269
290
function endTransfer (
270
291
bytes32 clientId ,
271
292
bytes32 transactionId ,
You can’t perform that action at this time.
0 commit comments