-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement getCommission() and extend readme
- Loading branch information
1 parent
e947a22
commit 4ce6913
Showing
3 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
pragma solidity ^0.8.26; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {NonRebasingLST} from "src/NonRebasingLST.sol"; | ||
import {DelegationV3} from "src/DelegationV3.sol"; | ||
import "forge-std/console.sol"; | ||
|
||
contract Stake is Script { | ||
function run(address payable proxy) external { | ||
|
||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
//address owner = vm.addr(deployerPrivateKey); | ||
|
||
DelegationV3 delegation = DelegationV3( | ||
proxy | ||
); | ||
|
||
console.log("Running version: %s", | ||
delegation.version() | ||
); | ||
|
||
console.log("Current stake: %s \r\n Current rewards: %s", | ||
delegation.getStake(), | ||
delegation.getRewards() | ||
); | ||
|
||
NonRebasingLST lst = NonRebasingLST(delegation.getLST()); | ||
console.log("LST address: %s", | ||
address(lst) | ||
); | ||
|
||
console.log("Current commission is: %s", | ||
delegation.getCommission() | ||
); | ||
|
||
vm.broadcast(deployerPrivateKey); | ||
delegation.setCommission(1000); | ||
|
||
console.log("New commission is: %s", | ||
delegation.getCommission() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters