v6.1.0
Adds a backward compatible (legacy) version is available in the legacy
folder.
TokenRecoverLegacy
contract will:
- implicitly set the deployer as contract owner
- send recovered tokens to owner instead of providing an explicit receiver
To use TokenRecoverLegacy
, a contract inheriting from TokenRecover
needs to be updated in the following way
pragma solidity ^0.8.20;
-import {TokenRecover} from "eth-token-recover/contracts/TokenRecover.sol";
+import {TokenRecoverLegacy} from "eth-token-recover/contracts/legacy/TokenRecoverLegacy.sol";
-contract MyContract is TokenRecover {
+contract MyContract is TokenRecoverLegacy {
// your stuff
}
DISCLAIMER
TokenRecoverLegacy
is a legacy version ofTokenRecover
that works as v4.x and earlier and MAY be removed in future releases.We highly recommend to keep the code updated to use newer versions of the recover.