Skip to content

Commit

Permalink
compounder fix
Browse files Browse the repository at this point in the history
  • Loading branch information
a17 committed Jun 22, 2024
1 parent a22b124 commit 9ea0958
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* VeDistributor proxy [0x7dc43c0165bfc9d202fa24bef10992f599014999](https://explorer.re.al/address/0x7dc43c0165bfc9d202fa24bef10992f599014999?tab=contract)
* Frontend [0x045c8a060474874c5918717ecd55f07b62c59a90](https://explorer.re.al/address/0x045c8a060474874c5918717ecd55f07b62c59a90?tab=contract)
* DepositHelper [0xAf95468B1a624605bbFb862B0FB6e9C73Ad847b8](https://explorer.re.al/address/0xAf95468B1a624605bbFb862B0FB6e9C73Ad847b8?tab=contract)
* Compounder proxy [0x87eDeA5aea52BA12Ebf4eBc253Ec3218C1090C70](https://explorer.re.al/address/0x87eDeA5aea52BA12Ebf4eBc253Ec3218C1090C70?tab=contract)
* Compounder proxy [0x377c3bfed5e7675821f7a15ade25bc580d4c9bbb](https://explorer.re.al/address/0x377c3bfed5e7675821f7a15ade25bc580d4c9bbb?tab=contract)

### Unreal testnet

Expand Down Expand Up @@ -43,7 +43,7 @@ forge fmt
### Deploy

```shell
forge script DeployReal --rpc-url https://real.drpc.org --slow --verify --verifier blockscout --verifier-url https://explorer.re.al/api?
forge script DeployReal --skip-simulation --broadcast --with-gas-price 300000000 --rpc-url https://real.drpc.org --slow --verify --verifier blockscout --verifier-url https://explorer.re.al/api?
```

### Add liquidator routes
Expand Down
25 changes: 25 additions & 0 deletions script/DeployCompounder.Real.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.26;

import "forge-std/Script.sol";
import {Compounder} from "../src/Compounder.sol";
import {ControllableProxy} from "../src/ControllableProxy.sol";

contract DeployCompounderReal is Script {
address internal constant CONTROLLER = 0xE0E71B484Bb20E37d18Ab51fB60c32deC778478A;

function run() external {
uint deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);

ControllableProxy proxy = new ControllableProxy();
address impl = address(new Compounder());
proxy.initProxy(impl);
Compounder compounder = Compounder(address(proxy));
compounder.init(CONTROLLER);

vm.stopBroadcast();
}

function testDeployHelpersReal() external {}
}
3 changes: 1 addition & 2 deletions src/Compounder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import "./lib/StringLib.sol";
contract Compounder is Controllable {
// --- CONSTANTS ---

string public constant VERSION = "1.0.0";
string public constant VERSION = "1.0.1";
uint public constant DELAY_RATE_DENOMINATOR = 100_000;
uint public constant HARDWORK_DELAY = 12 hours;

Expand Down Expand Up @@ -153,7 +153,6 @@ contract Compounder is Controllable {
&& strategy.totalAssets() > 0
) {
strategyNeedHardwork = true;
break;
}

uint delayAdjusted = _delay;
Expand Down

0 comments on commit 9ea0958

Please sign in to comment.