Skip to content

Commit

Permalink
Add version function to policies
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJem committed Jan 15, 2025
1 parent f5f4955 commit 558346d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/policies/CDAuctioneer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ contract CDAuctioneer is IConvertibleDepositAuctioneer, Policy, RolesConsumer, R
returns (Permissions[] memory permissions)
{}

function VERSION() external pure returns (uint8 major, uint8 minor) {
major = 1;
minor = 0;

return (major, minor);
}

// ========== AUCTION ========== //

/// @inheritdoc IConvertibleDepositAuctioneer
Expand Down
9 changes: 9 additions & 0 deletions src/policies/CDFacility.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ contract CDFacility is Policy, RolesConsumer, IConvertibleDepositFacility, Reent
locallyActive = false;
}

/// @inheritdoc Policy
function configureDependencies() external override returns (Keycode[] memory dependencies) {
dependencies = new Keycode[](5);
dependencies[0] = toKeycode("TRSRY");
Expand All @@ -69,6 +70,7 @@ contract CDFacility is Policy, RolesConsumer, IConvertibleDepositFacility, Reent
SCALE = 10 ** CDEPO.decimals();
}

/// @inheritdoc Policy
function requestPermissions()
external
view
Expand All @@ -89,6 +91,13 @@ contract CDFacility is Policy, RolesConsumer, IConvertibleDepositFacility, Reent
permissions[6] = Permissions(cdposKeycode, CDPOS.update.selector);
}

function VERSION() external pure returns (uint8 major, uint8 minor) {
major = 1;
minor = 0;

return (major, minor);
}

// ========== CONVERTIBLE DEPOSIT ACTIONS ========== //

/// @inheritdoc IConvertibleDepositFacility
Expand Down

0 comments on commit 558346d

Please sign in to comment.