Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit 4bdc86d

Browse files
authored
fix: deprecate transfer in title escrow (#58)
1 parent 9c1ccdb commit 4bdc86d

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

contracts/TitleEscrowCloneable.sol

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,7 @@ contract TitleEscrowCloneable is Context, Initializable, ITitleEscrow, HasHolder
102102
tokenRegistry.safeTransferFrom(address(this), address(newOwner), _tokenId);
103103
}
104104

105-
function transferTo(address newOwner) public virtual override isHoldingToken onlyHolder allowTransferOwner(newOwner) {
106-
revert("Transfer disabled");
107-
}
108-
109-
function surrender() external isHoldingToken onlyBeneficiary onlyHolder {
105+
function surrender() external override isHoldingToken onlyBeneficiary onlyHolder {
110106
_transferTo(address(tokenRegistry));
111107
}
112108

contracts/interfaces/ITitleEscrow.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ interface ITitleEscrow is IHasHolder, IHasBeneficiary, IERC165, IERC721Receiver
4444
/// @param newHolder The address of the new holder
4545
function changeHolder(address newHolder) external;
4646

47-
/// @notice Handle the token transfer by the holder after beneficiary's endorsement
48-
/// @param newBeneficiary The address of the new holder
49-
function transferTo(address newBeneficiary) external;
47+
/// @notice Surrender token back to registry
48+
function surrender() external;
5049

5150
/// @notice Public getter to access the approved owner if any
5251
function approvedOwner() external returns (address);

contracts/mocks/TitleEscrowCloneableMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity ^0.8.0;
44
import "../TitleEscrowCloneable.sol";
55

66
contract TitleEscrowCloneableMock is TitleEscrowCloneable {
7-
function transferTo(address newOwner) public override isHoldingToken onlyHolder allowTransferOwner(newOwner) {
7+
function transferTo(address newOwner) public isHoldingToken onlyHolder allowTransferOwner(newOwner) {
88
_transferTo(newOwner);
99
}
1010
}

test/TitleEscrowCloneable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe("TitleEscrowCloneable", async () => {
7272

7373
it("should have the correct ERC165 interface support", async () => {
7474
const escrowInstance = await makeTitleEscrow(beneficiary1.address, beneficiary1.address);
75-
const ITitleEscrowInterfaceId = "0x015509a1";
75+
const ITitleEscrowInterfaceId = "0x1676e9e0";
7676
const interfaceSupported = await escrowInstance.supportsInterface(ITitleEscrowInterfaceId);
7777
expect(interfaceSupported).to.be.equal(true, `Expected selector: ${ITitleEscrowInterfaceId}`);
7878
});

0 commit comments

Comments
 (0)