Skip to content

Commit

Permalink
🔨 Add a view function on the multi vesting contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Oct 11, 2023
1 parent f4854d3 commit db1c792
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/few-jokes-ring.md

This file was deleted.

13 changes: 11 additions & 2 deletions contracts/wallets/MultiVestingWallets.sol
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ contract MultiVestingWallets is FrakAccessControlUpgradeable {
}

/* -------------------------------------------------------------------------- */
/* Create vesting's */
/* Create vestings */
/* -------------------------------------------------------------------------- */

/**
Expand Down Expand Up @@ -328,7 +328,7 @@ contract MultiVestingWallets is FrakAccessControlUpgradeable {
}

/* -------------------------------------------------------------------------- */
/* View method's */
/* View methods */
/* -------------------------------------------------------------------------- */

/**
Expand Down Expand Up @@ -358,6 +358,15 @@ contract MultiVestingWallets is FrakAccessControlUpgradeable {
return owned[beneficiary].length();
}

/**
* @notice Get all the vesting id owned by an address.
* @param beneficiary Address to check.
* @return All the vesting ids of the address.
*/
function ownedVestingIds(address beneficiary) public view returns (uint256[] memory) {
return owned[beneficiary].values();
}

/**
* @notice Get the remaining amount of token of a beneficiary.
* @param beneficiary Address to check.
Expand Down

0 comments on commit db1c792

Please sign in to comment.