File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -144,10 +144,10 @@ contract DaimoPay {
144144 emit Start ({intentAddr: address (intentContract), intent: intent});
145145 }
146146
147- /// Completes intent immediately on chain B. The caller relayer makes a
148- /// transfer atomically in the same transaction and calls this function . The
149- /// relayer transfers some amount of token, and can make arbitrary calls to
150- /// convert it into the required amount of finalCallToken.
147+ /// Completes intent immediately on chain B. The relayer calls this function
148+ /// and atomically makes a transfer in the same transaction. The relayer
149+ /// can make arbitrary calls to convert the transferred tokens into the
150+ /// required amount of finalCallToken.
151151 ///
152152 /// Later, when the slower bridge transfer arrives, the relayer will be able
153153 /// to claim (bridgeTokenOut.token, bridgeTokenOut.amount), keeping the
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ struct PayIntent {
1313 /// @dev Intent only executes on given target chain.
1414 uint256 toChainId;
1515 /// @dev Possible output tokens after bridging to the destination chain.
16- /// Currently, ative token is not supported as a bridge token output.
16+ /// Currently, native token is not supported as a bridge token output.
1717 TokenAmount[] bridgeTokenOutOptions;
1818 /// @dev Expected token amount after swapping on the destination chain.
1919 TokenAmount finalCallToken;
Original file line number Diff line number Diff line change @@ -300,13 +300,16 @@ contract DaimoPayTest is Test {
300300 require (_toToken.balanceOf (intentAddr) == 100 );
301301 }
302302
303- function testSimpleRefundAfterClaim () public {
303+ // Test refundIntent for a same-chain intent. The refund should only be
304+ // possible after the intent has been claimed.
305+ function testSameChainRefundAfterClaim () public {
304306 testSimpleSameChainStart ();
305307
306308 PayIntent memory intent = getSimplePayIntent ();
307309 address intentAddr = intentFactory.getIntentAddress (intent);
308310
309- // Since we are on the dest chain already, we *cannot* refund on start.
311+ // Since we are on the dest chain already, we *cannot* refund after
312+ // startIntent.
310313 vm.expectRevert (bytes ("DP: not claimed " ));
311314 dp.refundIntent ({intent: intent, token: _toToken});
312315
You can’t perform that action at this time.
0 commit comments