Skip to content

Commit f336630

Browse files
authored
feat: JAAA caps change (#12)
1 parent b8fc853 commit f336630

2 files changed

Lines changed: 123 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## Reserve changes
2+
3+
### Reserves altered
4+
5+
#### JAAA ([0x5a0F93D040De44e78F251b03c43be9CF317Dcf64](https://etherscan.io/address/0x5a0F93D040De44e78F251b03c43be9CF317Dcf64))
6+
7+
| description | value before | value after |
8+
| --- | --- | --- |
9+
| supplyCap | 13,000,000 JAAA | 22,000,000 JAAA |
10+
11+
12+
## Raw diff
13+
14+
```json
15+
{
16+
"reserves": {
17+
"0x5a0F93D040De44e78F251b03c43be9CF317Dcf64": {
18+
"supplyCap": {
19+
"from": 13000000,
20+
"to": 22000000
21+
}
22+
}
23+
},
24+
"raw": {
25+
"0xae05cd22df81871bc7cc2a04becfb516bfe332c8": {
26+
"label": null,
27+
"contract": "lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy",
28+
"balanceDiff": null,
29+
"nonceDiff": null,
30+
"stateDiff": {
31+
"0x3e3cd529c7fd49079eabd02ec66b1f8c8d0cba5b926a12093d4fd96d7317f0c6": {
32+
"previousValue": "0x10000000000000000000000000000c65d4000000000000000106290421981fa4",
33+
"newValue": "0x100000000000000000000000000014fb18000000000000000106290421981fa4"
34+
}
35+
}
36+
},
37+
"0xe6ec1f0ae6cd023bd0a9b4d0253bdc755103253c": {
38+
"label": null,
39+
"contract": null,
40+
"balanceDiff": null,
41+
"nonceDiff": null,
42+
"stateDiff": {
43+
"0x0000000000000000000000000000000000000000000000000000000000000005": {
44+
"previousValue": "0x0000000000000000000000000000000000000000000000000000000000000033",
45+
"newValue": "0x0000000000000000000000000000000000000000000000000000000000000034"
46+
}
47+
}
48+
}
49+
}
50+
}
51+
```
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
import {IPoolDataProvider} from 'aave-v3-origin/contracts/interfaces/IPoolDataProvider.sol';
5+
import {ProtocolV3HorizonTestBase, ReserveConfig} from 'tests/utils/ProtocolV3HorizonTestBase.sol';
6+
import {AaveV3EthereumHorizon, AaveV3EthereumHorizonAssets} from 'aave-address-book-latest/AaveV3EthereumHorizon.sol';
7+
import {AaveHorizonGovV3Helpers} from 'src/utils/AaveHorizonGovV3Helpers.sol';
8+
9+
/**
10+
* @dev Test for GHO caps update via multisig transaction.
11+
* command: FOUNDRY_PROFILE=test forge test --match-contract AaveV3Horizon_JAAASupplyCap_20260518 -vv
12+
*/
13+
contract AaveV3Horizon_JAAASupplyCap_20260518 is ProtocolV3HorizonTestBase {
14+
address internal constant OPS_TARGET = 0x83Cb1B4af26EEf6463aC20AFbAC9c0e2E017202F;
15+
// from Safe UI
16+
bytes internal constant OPS_DATA =
17+
hex'571f03e50000000000000000000000005a0f93d040de44e78f251b03c43be9cf317dcf6400000000000000000000000000000000000000000000000000000000014fb180';
18+
uint256 internal constant OPS_NONCE = 51;
19+
20+
function setUp() public {
21+
vm.createSelectFork(vm.rpcUrl('mainnet'), 25125902);
22+
}
23+
24+
/**
25+
* @dev Full test suite: snapshots, state diff, validations, e2e.
26+
*/
27+
function test_defaultProposalExecution() public {
28+
defaultTest_v3_3('AaveV3Horizon_JAAASupplyCap_20260518', _pool(), _executeJAAASupplyCapUpdate);
29+
}
30+
31+
/**
32+
* @dev Custom before/after assertions for the JAAA supply cap change.
33+
*/
34+
function test_jaaaSupplyCapChange() public {
35+
(, uint256 supplyCapBefore) = (
36+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
37+
AaveV3EthereumHorizonAssets.JAAA_UNDERLYING
38+
)
39+
);
40+
41+
assertEq(supplyCapBefore, 13_000_000, 'Supply cap before');
42+
43+
_executeJAAASupplyCapUpdate();
44+
45+
(, uint256 supplyCapAfter) = (
46+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
47+
AaveV3EthereumHorizonAssets.JAAA_UNDERLYING
48+
)
49+
);
50+
51+
assertEq(supplyCapAfter, 22_000_000, 'Supply cap after');
52+
}
53+
54+
function test_calldata() public pure {
55+
AaveHorizonGovV3Helpers.Action memory action = AaveHorizonGovV3Helpers.Action({
56+
to: address(AaveV3EthereumHorizon.POOL_CONFIGURATOR),
57+
data: abi.encodeCall(
58+
AaveV3EthereumHorizon.POOL_CONFIGURATOR.setSupplyCap,
59+
(AaveV3EthereumHorizonAssets.JAAA_UNDERLYING, 22_000_000)
60+
)
61+
});
62+
(address to, bytes memory data, uint8 operation) = AaveHorizonGovV3Helpers
63+
.createOpsMultisigCalldata(action);
64+
assertEq(to, OPS_TARGET, 'ops target mismatch');
65+
assertEq(data, OPS_DATA, 'ops calldata mismatch');
66+
assertEq(operation, 0, 'ops operation mismatch');
67+
}
68+
69+
function _executeJAAASupplyCapUpdate() internal {
70+
_executeOpsMultisigTx({to: OPS_TARGET, data: OPS_DATA, operation: 0, nonce: OPS_NONCE});
71+
}
72+
}

0 commit comments

Comments
 (0)