diff --git a/packages/contract/src/pay/DaimoPay.sol b/packages/contract/src/pay/DaimoPay.sol index ea531416f..6a1f54d4e 100644 --- a/packages/contract/src/pay/DaimoPay.sol +++ b/packages/contract/src/pay/DaimoPay.sol @@ -13,10 +13,10 @@ import "./PayIntentFactory.sol"; import "./TokenUtils.sol"; // A Daimo Pay transfer has 4 steps: -// 1. Alice sends (tokenIn, amountIn) to handoff address on chain A -- simple erc20 transfer +// 1. Alice sends (tokenIn, amountIn) to intent address on chain A -- simple erc20 transfer // 2. Relayer swaps tokenIn to bridgeTokenIn and burns on chain A -- relayer runs this in sendAndSelfDestruct // - relayer doesnt need approve or anything else, just quote and swap. -// - quote comes from the handoff address which commits to the destination bridgeTokenOut amount, and therefore bridgeTokenIn amount. +// - quote comes from the intent address which commits to the destination bridgeTokenOut amount, and therefore bridgeTokenIn amount. // - relayer has to fetch swap from Uniswap or similar // Fork: fastFinish, then claim @@ -121,7 +121,7 @@ contract DaimoPay { ) public { require(intent.toChainId == block.chainid, "DP: wrong chain"); - // Calculate handoff address + // Calculate intent address address intentAddr = intentFactory.getIntentAddress(intent); // Optimistic fast finish is only for transfers which haven't already diff --git a/packages/contract/src/pay/PayIntent.sol b/packages/contract/src/pay/PayIntent.sol index 4bb9e1f86..a7243fb13 100644 --- a/packages/contract/src/pay/PayIntent.sol +++ b/packages/contract/src/pay/PayIntent.sol @@ -136,7 +136,7 @@ contract PayIntentContract is Initializable { amount: amount }); - // This use of SELFDESTRUCT is compatible with EIP-6780. Handoff + // This use of SELFDESTRUCT is compatible with EIP-6780. Intent // contracts are deployed, then destroyed in the same transaction. // solhint-disable-next-line selfdestruct(intent.escrow); diff --git a/packages/contract/test/DaimoPay.t.sol b/packages/contract/test/DaimoPay.t.sol index 933b43f39..687b53225 100644 --- a/packages/contract/test/DaimoPay.t.sol +++ b/packages/contract/test/DaimoPay.t.sol @@ -123,7 +123,7 @@ contract DaimoPayTest is Test { console.log("TestUSDC (toToken) address:", address(_toToken)); } - function testGetHandoffAddr() public view { + function testGetIntentAddr() public view { PayIntent memory baseIntent = PayIntent({ toChainId: _baseChainId, bridgeTokenOut: TokenAmount({token: _toToken, amount: _toAmount}), @@ -446,7 +446,7 @@ contract DaimoPayTest is Test { // Wait for CCTP to relay the message vm.warp(block.timestamp + 20 minutes); - // CCTP receiveMessage() sends funds to the handoff address + // CCTP receiveMessage() sends funds to the intent address _toToken.transfer(BASE_INTENT_ADDR, _toAmount); // Then, LP claims the funds @@ -470,7 +470,7 @@ contract DaimoPayTest is Test { dp.claimIntent({intent: intent, calls: new Call[](0)}); - // LP received funds from handoff, and handoff is destroyed + // LP received funds from intent, and intent is destroyed assertEq(_toToken.balanceOf(BASE_INTENT_ADDR), 0); assertEq(_toToken.balanceOf(_lp), _lpToTokenInitBalance); assertEq(_toToken.balanceOf(_bob), _toAmount); @@ -483,7 +483,7 @@ contract DaimoPayTest is Test { // Wait for CCTP to relay the message vm.warp(block.timestamp + 20 minutes); - // CCTP receiveMessage() sends funds to the handoff address + // CCTP receiveMessage() sends funds to the intent address _toToken.transfer(BASE_INTENT_ADDR, _toAmount); // Then, a third party calls claimIntent @@ -514,7 +514,7 @@ contract DaimoPayTest is Test { dp.claimIntent({intent: intent, calls: new Call[](0)}); - // LP doesn't receive funds, handoff is destroyed, and funds are sent + // LP doesn't receive funds, intent is destroyed, and funds are sent // to the final recipient assertEq(_toToken.balanceOf(BASE_INTENT_ADDR), 0); assertEq(_toToken.balanceOf(_lp), 0);