Skip to content

Commit

Permalink
feat: add surrender function (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
superical authored Nov 8, 2021
1 parent e2cb4e1 commit 634f08d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/TitleEscrowCloneable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import "./interfaces/ITitleEscrow.sol";
import "./lib/Initializable.sol";
import { ERC721, ERC165 } from "./lib/ERC721.sol";


contract TitleEscrowCloneable is Context, Initializable, ITitleEscrow, HasHolderInitializable, HasNamedBeneficiaryInitializable, ERC165 {
// Documentation on how this smart contract works: https://docs.tradetrust.io/docs/overview/title-transfer

Expand Down Expand Up @@ -106,6 +105,10 @@ contract TitleEscrowCloneable is Context, Initializable, ITitleEscrow, HasHolder
_transferTo(newOwner);
}

function surrender() external isHoldingToken onlyBeneficiary onlyHolder {
_transferTo(address(tokenRegistry));
}

function transferToNewEscrow(address newBeneficiary, address newHolder)
public
override
Expand Down

0 comments on commit 634f08d

Please sign in to comment.