File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ interface IRiskpool is IComponent {
2121 event LogRiskpoolBalanceDecreased (bytes32 processId , uint256 amount , uint256 newBalance );
2222
2323 function createBundle (bytes calldata filter , uint256 initialAmount ) external returns (uint256 bundleId );
24- function fundBundle (uint256 bundleId , uint256 amount ) external ;
25- function defundBundle (uint256 bundleId , uint256 amount ) external ;
24+ function fundBundle (uint256 bundleId , uint256 amount ) external returns ( bool success , uint256 netAmount ) ;
25+ function defundBundle (uint256 bundleId , uint256 amount ) external returns ( bool success , uint256 netAmount ) ;
2626
2727 function lockBundle (uint256 bundleId ) external ;
2828 function unlockBundle (uint256 bundleId ) external ;
Original file line number Diff line number Diff line change @@ -99,15 +99,17 @@ abstract contract Riskpool is
9999 function fundBundle (uint256 bundleId , uint256 amount )
100100 external override
101101 onlyBundleOwner (bundleId)
102+ returns (bool success , uint256 netAmount )
102103 {
103- _riskpoolService.fundBundle (bundleId, amount);
104+ (success, netAmount) = _riskpoolService.fundBundle (bundleId, amount);
104105 }
105106
106107 function defundBundle (uint256 bundleId , uint256 amount )
107108 external override
108109 onlyBundleOwner (bundleId)
110+ returns (bool success , uint256 netAmount )
109111 {
110- _riskpoolService.defundBundle (bundleId, amount);
112+ (success, netAmount) = _riskpoolService.defundBundle (bundleId, amount);
111113 }
112114
113115 function lockBundle (uint256 bundleId )
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ pragma solidity ^0.8.0;
44interface IRiskpoolService {
55
66 function createBundle (address owner_ , bytes calldata filter_ , uint256 amount_ ) external returns (uint256 bundleId );
7- function fundBundle (uint256 bundleId , uint256 amount ) external ;
8- function defundBundle (uint256 bundleId , uint256 amount ) external ;
7+ function fundBundle (uint256 bundleId , uint256 amount ) external returns ( bool success , uint256 netAmount ) ;
8+ function defundBundle (uint256 bundleId , uint256 amount ) external returns ( bool success , uint256 netAmount ) ;
99
1010 function lockBundle (uint256 bundleId ) external ;
1111 function unlockBundle (uint256 bundleId ) external ;
You can’t perform that action at this time.
0 commit comments