At the top of the Timberwolves’ to-do list entering free agency was re-signing the two restricted free agents they swapped a first-round pick for in a four-team trade before the trade deadline in February — Malik Beasley and Juancho Hernangomez.

Beasley agreed to a new deal Friday night and Hernangomez followed Sunday, agreeing to a three-year, $21 million deal, a source said. The third year is a team option, the source added.

The Wolves made more moves Sunday in trading Omari Spellman, Jacob Evans and a future second-round pick to the Knicks for 31-year-old forward Ed Davis, who has one year left on a deal that pays him about $5 million, a source said.

They also rescinded a qualifying offer to guard/forward Kelan Martin, making Martin an unrestricted free agent, a source confirmed.

Barring a trade, there shouldn’t be much more major activity for the Wolves, given their tight salary-cap situation. Their other significant moves this offseason came Wednesday when they drafted Georgia’s Anthony Edwards No. 1 overall and swung a trade with Oklahoma City to bring Ricky Rubio back to Minnesota.

Two days after that, Beasley agreed to a four-year, $60 million deal with a team option for the fourth year a few hours after free agency opened. Hernangomez’s deal took a little more time, but the Wolves were always confident he would end up back with them.

President Gersson Rosas had said repeatedly it was a priority to get both Hernangomez and Beasley signed after acquiring them. He has now done that.

Hernangomez figures to compete for minutes at power forward, a position the Wolves don’t have in great supply on their current roster. Hernangomez averaged 12.9 points and 7.3 rebounds in 14 games with the Wolves after the trade. He had not averaged more than six points per game with Denver in three-plus seasons.

Davis has played in 10 NBA seasons for six different teams, averaging 6.3 points and 6.6 rebounds for his career. He was most recently with Utah before the Jazz traded him to the Knicks earlier this week. Evans and Spellman had come to the Wolves as filler in the D’Angelo Russell trade with Golden State.

Because the Wolves traded for Hernangomez and Beasley, they owned their Bird Rights, meaning the Wolves were allowed to exceed the salary cap to re-sign them.

While the exact details of how their salaries may escalate are unknown, the Wolves will have little room to maneuver — likely only a couple million dollars — under the $132.6 million luxury tax threshold to sign any other players and use their mid-level exception, which can be worth up to around $9.3 million, or their biannual exception at $3.6 million.

Entering the offseason, some Wolves fans had pie-in-the-sky hopes the team would find a way to bring a disgruntled superstar to Minnesota, such as Phoenix’s Devin Booker or Philadelphia’s Ben Simmons, but those players are staying put for at least another season and not trying to force their way out of town.

What this offseason displayed is the Wolves may be loading up to make such a move happen in future years. Rosas has often said he expects major moves to happen in his tenure via trade instead of free agency, and that showed when the Wolves missed on Russell last offseason only to trade for him months later.

The Wolves swapped out James Johnson’s expiring contract, which was worth just under $16 million, for Rubio, who has an extra year on his deal. That salary in a year or so could combine, potentially, with others like Beasley’s to make up the salary that would have to go to another team (along with a likely trove of draft picks) in a deal to land another star player.