File tree Expand file tree Collapse file tree 1 file changed +7
-18
lines changed
examples/developer-hub-solidity Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -8,23 +8,7 @@ import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
88import {RedemptionRequestInfo} from "flare-periphery-contracts-fassets-test/coston2/data/RedemptionRequestInfo.sol " ;
99
1010contract FAssetsRedeem {
11- // 1. Use the AssetManager contract
12- IAssetManager public immutable assetManager;
13- IERC20 public immutable underlyingToken;
14-
15- address public immutable fAssetToken;
16-
17- constructor (address _assetManager , address _fAssetToken ) {
18- assetManager = IAssetManager (_assetManager);
19- fAssetToken = _fAssetToken;
20- }
21-
22- // 2. Approve FAssets for redemption
23- function approveFAssets (uint256 _amount ) public returns (bool ) {
24- return IERC20 (fAssetToken).approve (address (this ), _amount);
25- }
26-
27- // 3. Redeem FAssets (requires prior approval)
11+ // 1. Redeem FAssets
2812 function redeem (
2913 uint256 _lots ,
3014 string memory _redeemerUnderlyingAddressString
@@ -47,7 +31,12 @@ contract FAssetsRedeem {
4731 return redeemedAmountUBA;
4832 }
4933
50- // 4. Get the AssetManager settings
34+ function getFXRPAddress () public view returns (address ) {
35+ IAssetManager assetManager = ContractRegistry.getAssetManagerFXRP ();
36+ return address (assetManager.fAsset ());
37+ }
38+
39+ // 2. Get the AssetManager settings
5140 function getSettings ()
5241 public
5342 view
You can’t perform that action at this time.
0 commit comments