Skip to content

Commit b4bfc2b

Browse files
committed
fea: add PositionManager
1 parent da0a70d commit b4bfc2b

13 files changed

Lines changed: 1266 additions & 127 deletions

config/params.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ tokens = [
6464
"0x7E318884f6f299031F4Fa88D7A324E076d460A4b",
6565
"0x0EA46a4C257071352b57E9F6d054fC137F6E14b9",
6666
"0xe052823b4aefc6e230FAf46231A57d0905E30AE0",
67-
"0x1e798C7fcE8B3Cdce8950f8Ff5a0C62f1Dc7d532",
68-
"0xF74d306D939724236d7D99858428bC786A495932",
6967
]
7068

7169
### Oracles
@@ -110,8 +108,6 @@ ptBaseOracles = [
110108
"0xac15dD96f1059a7F58c89e1bB57417C804DA6157",
111109
"0x2FEed35e88ac4de0fe8f43F13BAd378E4Dc7Ad99",
112110
"0x55791D105E485Da4DE7e275090c64a8De12080a7",
113-
"0xEf3fE714D397ABF83631B9ADee021d8CC80104Fb",
114-
"0xA7c82BA0438748293E51aA726289dE4848BcC722",
115111
]
116112

117113
wallets = [
@@ -198,17 +194,13 @@ tokenNames = [
198194
"ptUSDe07May2026",
199195
"ptSrUSDe02APR2026",
200196
"ptSlisBNBx25JUN2026",
201-
"ptSUSDai15OTC2026",
202-
"ptCUSD24JUL2026",
203197
]
204198

205199
ptBaseOracleNames = [
206200
"ptsUSDe09APR2026PlasmaBaseOracle",
207201
"ptUSDe07May2026BaseOracle",
208202
"ptSrUSDe02APR2026BaseOracle",
209203
"ptSlisBNBx25JUN2026BaseOracle",
210-
"ptSUSDai15OTC2026BaseOracle",
211-
"ptCUSD24JUL2026BaseOracle",
212204
]
213205

214206
oracleNames = [

config/pt_oracles_20260320.toml

Lines changed: 0 additions & 33 deletions
This file was deleted.

script/broker/deploy_broker.s.sol

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ contract DeployLendingBroker is Script {
99
address moolah;
1010
address interestRelayer;
1111
address oracle;
12+
address wbnb;
1213
address timelock;
1314
address manager;
1415
address pauser;
@@ -20,6 +21,7 @@ contract DeployLendingBroker is Script {
2021
moolah = vm.envAddress("MOOLAH");
2122
interestRelayer = vm.envAddress("INTEREST_RELAYER");
2223
oracle = vm.envAddress("ORACLE");
24+
wbnb = vm.envOr("WBNB", address(0));
2325
timelock = vm.envAddress("TIMELOCK");
2426
manager = vm.envAddress("MANAGER");
2527
pauser = vm.envAddress("PAUSER");
@@ -35,7 +37,7 @@ contract DeployLendingBroker is Script {
3537
vm.startBroadcast(deployerPrivateKey);
3638

3739
// Deploy LendingBroker implementation
38-
LendingBroker impl = new LendingBroker(moolah, interestRelayer, oracle);
40+
LendingBroker impl = new LendingBroker(moolah, interestRelayer, oracle, wbnb);
3941
console.log("LendingBroker implementation: ", address(impl));
4042

4143
// Deploy LendingBroker proxy
@@ -56,8 +58,8 @@ contract DeployLendingBroker is Script {
5658
// grant roles to manager and admin
5759
bytes32 MANAGER = keccak256("MANAGER");
5860
bytes32 DEFAULT_ADMIN_ROLE = 0x0000000000000000000000000000000000000000000000000000000000000000;
59-
LendingBroker(address(proxy)).grantRole(MANAGER, manager);
60-
LendingBroker(address(proxy)).grantRole(DEFAULT_ADMIN_ROLE, timelock);
61+
LendingBroker(payable(address(proxy))).grantRole(MANAGER, manager);
62+
LendingBroker(payable(address(proxy))).grantRole(DEFAULT_ADMIN_ROLE, timelock);
6163

6264
vm.stopBroadcast();
6365
}

script/broker/deploy_brokerImpl.s.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ contract DeployLendingBrokerImpl is Script {
88
address moolah;
99
address interestRelayer;
1010
address oracle;
11+
address wbnb;
1112

1213
function setUp() public {
1314
moolah = vm.envAddress("MOOLAH");
1415
interestRelayer = vm.envAddress("INTEREST_RELAYER");
1516
oracle = vm.envAddress("ORACLE");
17+
wbnb = vm.envOr("WBNB", address(0));
1618
}
1719

1820
function run() public {
@@ -22,7 +24,7 @@ contract DeployLendingBrokerImpl is Script {
2224
vm.startBroadcast(deployerPrivateKey);
2325

2426
// Deploy LendingBroker implementation
25-
LendingBroker impl = new LendingBroker(moolah, interestRelayer, oracle);
27+
LendingBroker impl = new LendingBroker(moolah, interestRelayer, oracle, wbnb);
2628
console.log("LendingBroker implementation: ", address(impl));
2729

2830
vm.stopBroadcast();

script/deploy_pTLinearDiscountOracleWithConfig.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ contract PTLinearDiscountOracleWithConfigDeploy is Script, Config {
8080
vm.setEnv(walletNames[i], vm.toString(wallets[i]));
8181
}
8282

83-
_loadConfig("./config/pt_oracles_20260320.toml", true);
83+
_loadConfig("./config/pt_oracles_20260205.toml", true);
8484
}
8585
}

0 commit comments

Comments
 (0)