Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions contracts/contracts/strategies/sonic/SonicValidatorDelegator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,8 @@ abstract contract SonicValidatorDelegator is InitializableAbstractStrategy {
for (uint256 i = 0; i < validatorLen; i++) {
uint256 validator = supportedValidators[i];
// Get the staked amount and any pending rewards
balance += sfc.getStake(
address(this),
validator
);
balance += sfc.pendingRewards(
address(this),
validator
);
balance += sfc.getStake(address(this), validator);
balance += sfc.pendingRewards(address(this), validator);
}
}

Expand Down Expand Up @@ -174,10 +168,7 @@ abstract contract SonicValidatorDelegator is InitializableAbstractStrategy {
// Can still undelegate even if the validator is no longer supported
require(undelegateAmount > 0, "Must undelegate something");

uint256 amountDelegated = sfc.getStake(
address(this),
validatorId
);
uint256 amountDelegated = sfc.getStake(address(this), validatorId);
require(undelegateAmount <= amountDelegated, "Insufficient delegation");

withdrawId = nextWithdrawId++;
Expand Down
26 changes: 13 additions & 13 deletions contracts/deploy/sonic/001_vault_and_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,19 @@ module.exports = deployOnSonic(
signature: "setStrategistAddr(address)",
args: [strategistAddr],
},
// 9. set the trustee address
{
contract: cOSonicVault,
signature: "setTrusteeAddress(address)",
args: [strategistAddr],
},
// 10. set the trustee fee
{
contract: cOSonicVault,
signature: "setTrusteeFeeBps(uint256)",
args: [2000], // 20%
},
// 11. Set the Dripper on the Vault
// // 9. set the trustee address
// {
// contract: cOSonicVault,
// signature: "setTrusteeAddress(address)",
// args: [strategistAddr],
// },
// // 10. set the trustee fee
// {
// contract: cOSonicVault,
// signature: "setTrusteeFeeBps(uint256)",
// args: [2000], // 20%
// },
// 9. Set the Dripper on the Vault
{
contract: cOSonicVault,
signature: "setDripper(address)",
Expand Down
4 changes: 3 additions & 1 deletion contracts/deployments/sonic/.migrations.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"001_vault_and_token": 1736867284
}
387 changes: 387 additions & 0 deletions contracts/deployments/sonic/FixedRateDripper.json

Large diffs are not rendered by default.

Loading
Loading