diff --git a/contracts/OffsetHelper.sol b/contracts/OffsetHelper.sol index 984217d..87523b0 100644 --- a/contracts/OffsetHelper.sol +++ b/contracts/OffsetHelper.sol @@ -359,7 +359,7 @@ contract OffsetHelper is OffsetHelperStorage { IToucanPoolToken PoolTokenImplementation = IToucanPoolToken(_fromToken); // auto redeem pool token for TCO2; will transfer automatically picked TCO2 to this contract - (tco2s, amounts) = PoolTokenImplementation.redeemAuto2(_amount); + (tco2s, amounts) = PoolTokenImplementation.redeemAuto(_amount); // update balances balances[msg.sender][_fromToken] -= _amount; diff --git a/contracts/interfaces/IToucanPoolToken.sol b/contracts/interfaces/IToucanPoolToken.sol index 25672ed..b0c2d5c 100644 --- a/contracts/interfaces/IToucanPoolToken.sol +++ b/contracts/interfaces/IToucanPoolToken.sol @@ -12,24 +12,27 @@ interface IToucanPoolToken is IERC20Upgradeable { function checkEligible(address erc20Addr) external view returns (bool); - function checkAttributeMatching(address erc20Addr) - external - view - returns (bool); + function checkAttributeMatching( + address erc20Addr + ) external view returns (bool); function calculateRedeemFees( address[] memory tco2s, uint256[] memory amounts ) external view returns (uint256); - function redeemMany(address[] memory tco2s, uint256[] memory amounts) - external; + function redeemMany( + address[] memory tco2s, + uint256[] memory amounts + ) external; - function redeemAuto(uint256 amount) external; + function redeemAuto( + uint256 amount + ) external returns (address[] memory tco2s, uint256[] memory amounts); - function redeemAuto2(uint256 amount) - external - returns (address[] memory tco2s, uint256[] memory amounts); + function redeemAuto2( + uint256 amount + ) external returns (address[] memory tco2s, uint256[] memory amounts); function getRemaining() external view returns (uint256); diff --git a/utils/addresses.ts b/utils/addresses.ts index 85fc4da..5beb610 100644 --- a/utils/addresses.ts +++ b/utils/addresses.ts @@ -1,3 +1,14 @@ +interface IfcPoolAddresses { + BCT: string; + NCT: string; +} +interface IfcNetworkPoolAddresses { + celo: IfcPoolAddresses; + alfajores: IfcPoolAddresses; + polygon: IfcPoolAddresses; + mumbai: IfcPoolAddresses; +} + interface IfcOneNetworkAddresses { BCT: string; NCT: string; diff --git a/utils/paths.ts b/utils/paths.ts index 39b743f..ab3c56a 100644 --- a/utils/paths.ts +++ b/utils/paths.ts @@ -1,7 +1,3 @@ -interface IfcPoolAddresses { - BCT: string; - NCT: string; -} interface IfcTokenAddresses { mcUSD?: string[]; cUSD?: string[]; @@ -16,12 +12,6 @@ interface IfcNetworkTokenAddresses { polygon: IfcTokenAddresses; mumbai: IfcTokenAddresses; } -interface IfcNetworkPoolAddresses { - celo: IfcPoolAddresses; - alfajores: IfcPoolAddresses; - polygon: IfcPoolAddresses; - mumbai: IfcPoolAddresses; -} const paths: IfcNetworkTokenAddresses = { celo: { @@ -56,6 +46,11 @@ const paths: IfcNetworkTokenAddresses = { "0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1", "0x71DB38719f9113A36e14F409bAD4F07B58b4730b", ], + WETH: [ + "0x48D380cb7de1da5d4cA0DAA696480943fD93B9fF", + "0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1", + "0x71DB38719f9113A36e14F409bAD4F07B58b4730b", + ], }, polygon: { USDC: ["0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"],