Skip to content

Commit 5bc924f

Browse files
committed
test: check rwa aToken transfer
1 parent 969119b commit 5bc924f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/utils/HorizonConfigAssertionHelper.sol

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ abstract contract HorizonConfigAssertionHelper is Test {
8787
function _assertRwaConfig(IPool pool, address underlying) internal {
8888
_assertRwaOracleRegistry(underlying);
8989
_assertRwaATokenApproveReverts(pool, underlying);
90+
_assertRwaATokenTransferReverts(pool, underlying);
9091
_assertRwaReserveConfigurationSanityCheck(pool, underlying);
9192
}
9293

@@ -214,6 +215,14 @@ abstract contract HorizonConfigAssertionHelper is Test {
214215
IERC20(aToken).approve(makeAddr('tmpUser'), 0);
215216
}
216217

218+
function _assertRwaATokenTransferReverts(IPool pool, address underlying) internal {
219+
address aToken = pool.getReserveAToken(underlying);
220+
deal(aToken, makeAddr('tmpUser'), 1e18);
221+
// rwa aTokens do not support aToken transfers
222+
vm.expectRevert(bytes(Errors.OPERATION_NOT_SUPPORTED));
223+
IERC20(aToken).transfer(makeAddr('tmpUser2'), 1);
224+
}
225+
217226
// ─── eMode config assertions ──────────────────────────────────────
218227

219228
function _assertEModeConfig(IPool pool, ExpectedEModeConfig memory expected) internal view {

0 commit comments

Comments
 (0)