Skip to content

Commit 6f162e0

Browse files
authored
Merge pull request #6 from flare-foundation/v0.1.29
Update version to 0.1.29 and add IAssetManagerController interface with related functions for asset management. Also, implement getAssetManagerController function in ContractRegistry for retrieving the asset manager controller instance.
2 parents 99d670e + 383673e commit 6f162e0

13 files changed

+121
-10
lines changed

coston/ContractRegistry.sol

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import {RewardsV2Interface} from "./RewardsV2Interface.sol";
4141
import {IFdcVerification} from "./IFdcVerification.sol";
4242
import {IFdcHub} from "./IFdcHub.sol";
4343
import {IFdcRequestFeeConfigurations} from "./IFdcRequestFeeConfigurations.sol";
44+
import {IAssetManagerController} from "./IAssetManagerController.sol";
4445
import {IJsonApiVerification} from "./IJsonApiVerification.sol";
4546
import {IWeb2JsonVerification} from "./IWeb2JsonVerification.sol";
4647
// END AUTO GENERATED - DO NOT EDIT ABOVE THIS LINE
@@ -482,6 +483,19 @@ library ContractRegistry {
482483
);
483484
}
484485

486+
function getAssetManagerController()
487+
internal
488+
view
489+
returns (IAssetManagerController)
490+
{
491+
return
492+
IAssetManagerController(
493+
FLARE_CONTRACT_REGISTRY.getContractAddressByHash(
494+
keccak256(abi.encode("AssetManagerController"))
495+
)
496+
);
497+
}
498+
485499
// Returns hardcoded unofficial deployment instances of Flare core contracts
486500
function auxiliaryGetIJsonApiVerification()
487501
internal

coston/IAssetManager.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity >=0.7.6 <0.9;
33

4-
import "./IFdcVerification.sol";
4+
import ".//IFdcVerification.sol";
55
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
66
import "./diamond/interfaces/IDiamondLoupe.sol";
77
import "./userInterfaces/data/AssetManagerSettings.sol";
@@ -629,7 +629,8 @@ interface IAssetManager is
629629
uint256 _maxMintingFeeBIPS,
630630
address payable _executor,
631631
string[] calldata _minterUnderlyingAddresses
632-
) external payable;
632+
) external payable
633+
returns (uint256 _collateralReservationId);
633634

634635
/**
635636
* Agent approves the collateral reservation request after checking the minter's identity.

coston/IAssetManagerController.sol

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity >=0.7.6 <0.9;
3+
4+
import "./IAssetManager.sol";
5+
6+
7+
interface IAssetManagerController {
8+
/**
9+
* Return the list of all asset managers managed by this controller.
10+
*/
11+
function getAssetManagers()
12+
external view
13+
returns (IAssetManager[] memory);
14+
15+
/**
16+
* Check whether the asset manager is managed by this controller.
17+
* @param _assetManager an asset manager address
18+
*/
19+
function assetManagerExists(address _assetManager)
20+
external view
21+
returns (bool);
22+
}

coston/ICoreVault.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity >=0.7.6 <0.9;
33

4-
import "./IFdcVerification.sol";
4+
import ".//IFdcVerification.sol";
55

66

77
/**

coston2/ContractRegistry.sol

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {RewardsV2Interface} from "./RewardsV2Interface.sol";
4949
import {IFdcVerification} from "./IFdcVerification.sol";
5050
import {IFdcHub} from "./IFdcHub.sol";
5151
import {IFdcRequestFeeConfigurations} from "./IFdcRequestFeeConfigurations.sol";
52+
import {IAssetManagerController} from "./IAssetManagerController.sol";
5253
import {IJsonApiVerification} from "./IJsonApiVerification.sol";
5354
import {IWeb2JsonVerification} from "./IWeb2JsonVerification.sol";
5455
// END AUTO GENERATED - DO NOT EDIT ABOVE THIS LINE
@@ -578,6 +579,19 @@ library ContractRegistry {
578579
);
579580
}
580581

582+
function getAssetManagerController()
583+
internal
584+
view
585+
returns (IAssetManagerController)
586+
{
587+
return
588+
IAssetManagerController(
589+
FLARE_CONTRACT_REGISTRY.getContractAddressByHash(
590+
keccak256(abi.encode("AssetManagerController"))
591+
)
592+
);
593+
}
594+
581595
// Returns hardcoded unofficial deployment instances of Flare core contracts
582596
function auxiliaryGetIJsonApiVerification()
583597
internal

coston2/IAssetManager.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity >=0.7.6 <0.9;
33

4-
import "./IFdcVerification.sol";
4+
import ".//IFdcVerification.sol";
55
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
66
import "./diamond/interfaces/IDiamondLoupe.sol";
77
import "./userInterfaces/data/AssetManagerSettings.sol";
@@ -629,7 +629,8 @@ interface IAssetManager is
629629
uint256 _maxMintingFeeBIPS,
630630
address payable _executor,
631631
string[] calldata _minterUnderlyingAddresses
632-
) external payable;
632+
) external payable
633+
returns (uint256 _collateralReservationId);
633634

634635
/**
635636
* Agent approves the collateral reservation request after checking the minter's identity.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity >=0.7.6 <0.9;
3+
4+
import "./IAssetManager.sol";
5+
6+
7+
interface IAssetManagerController {
8+
/**
9+
* Return the list of all asset managers managed by this controller.
10+
*/
11+
function getAssetManagers()
12+
external view
13+
returns (IAssetManager[] memory);
14+
15+
/**
16+
* Check whether the asset manager is managed by this controller.
17+
* @param _assetManager an asset manager address
18+
*/
19+
function assetManagerExists(address _assetManager)
20+
external view
21+
returns (bool);
22+
}

coston2/ICoreVault.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity >=0.7.6 <0.9;
33

4-
import "./IFdcVerification.sol";
4+
import ".//IFdcVerification.sol";
55

66

77
/**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@flarenetwork/flare-periphery-contracts",
33
"description": "Smart contracts for all Flare chains",
4-
"version": "0.1.26",
4+
"version": "0.1.29",
55
"author": "Flare Network",
66
"license": "MIT",
77
"keywords": [

songbird/ContractRegistry.sol

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import {RewardsV2Interface} from "./RewardsV2Interface.sol";
4141
import {IFdcVerification} from "./IFdcVerification.sol";
4242
import {IFdcHub} from "./IFdcHub.sol";
4343
import {IFdcRequestFeeConfigurations} from "./IFdcRequestFeeConfigurations.sol";
44+
import {IAssetManagerController} from "./IAssetManagerController.sol";
4445
// END AUTO GENERATED - DO NOT EDIT ABOVE THIS LINE
4546

4647
// Library is intended to be used inline, so the strings are all memory allocated (instead of calldata)
@@ -480,5 +481,18 @@ library ContractRegistry {
480481
);
481482
}
482483

484+
function getAssetManagerController()
485+
internal
486+
view
487+
returns (IAssetManagerController)
488+
{
489+
return
490+
IAssetManagerController(
491+
FLARE_CONTRACT_REGISTRY.getContractAddressByHash(
492+
keccak256(abi.encode("AssetManagerController"))
493+
)
494+
);
495+
}
496+
483497
// END AUTO GENERATED - DO NOT EDIT ABOVE THIS LINE
484498
}

0 commit comments

Comments
 (0)