Skip to content

Commit e93d9e4

Browse files
author
Lena Hierzi
committed
refactor: call autoRedeem instead of autoRedeem2
1 parent b667db2 commit e93d9e4

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

contracts/OffsetHelper.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import "./interfaces/IToucanContractRegistry.sol";
1717
*
1818
* Retiring carbon tokens requires multiple steps and interactions with
1919
* Toucan Protocol's main contracts:
20-
* 1. Obtain a Toucan pool token e.g., NCT (by performing a token
20+
* 1. Obtain a pool token e.g., NCT (by performing a token
2121
* swap on a DEX).
2222
* 2. Redeem the pool token for a TCO2 token.
2323
* 3. Retire the TCO2 token.
@@ -359,7 +359,7 @@ contract OffsetHelper is OffsetHelperStorage {
359359
IToucanPoolToken PoolTokenImplementation = IToucanPoolToken(_fromToken);
360360

361361
// auto redeem pool token for TCO2; will transfer automatically picked TCO2 to this contract
362-
(tco2s, amounts) = PoolTokenImplementation.redeemAuto2(_amount);
362+
(tco2s, amounts) = PoolTokenImplementation.redeemAuto(_amount);
363363

364364
// update balances
365365
balances[msg.sender][_fromToken] -= _amount;

contracts/interfaces/IToucanPoolToken.sol

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,27 @@ interface IToucanPoolToken is IERC20Upgradeable {
1212

1313
function checkEligible(address erc20Addr) external view returns (bool);
1414

15-
function checkAttributeMatching(address erc20Addr)
16-
external
17-
view
18-
returns (bool);
15+
function checkAttributeMatching(
16+
address erc20Addr
17+
) external view returns (bool);
1918

2019
function calculateRedeemFees(
2120
address[] memory tco2s,
2221
uint256[] memory amounts
2322
) external view returns (uint256);
2423

25-
function redeemMany(address[] memory tco2s, uint256[] memory amounts)
26-
external;
24+
function redeemMany(
25+
address[] memory tco2s,
26+
uint256[] memory amounts
27+
) external;
2728

28-
function redeemAuto(uint256 amount) external;
29+
function redeemAuto(
30+
uint256 amount
31+
) external returns (address[] memory tco2s, uint256[] memory amounts);
2932

30-
function redeemAuto2(uint256 amount)
31-
external
32-
returns (address[] memory tco2s, uint256[] memory amounts);
33+
function redeemAuto2(
34+
uint256 amount
35+
) external returns (address[] memory tco2s, uint256[] memory amounts);
3336

3437
function getRemaining() external view returns (uint256);
3538

0 commit comments

Comments
 (0)