Skip to content

Commit

Permalink
spell correct withdrawal and add burn/burnBundle for riskpool bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaszimmermann committed Jul 18, 2022
1 parent 73ba86b commit 2a59585
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions contracts/modules/IBundle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ interface IBundle {
function lock(uint256 bundleId) external;
function unlock(uint256 bundleId) external;
function close(uint256 bundleId) external;
function burn(uint256 bundleId) external;

function collateralizePolicy(uint256 bundleId, bytes32 processId, uint256 collateralAmount) external;
function releasePolicy(uint256 bundleId, bytes32 processId) external returns(uint256 collateralAmount);
Expand Down
24 changes: 13 additions & 11 deletions contracts/modules/ITreasury.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface ITreasury {

event LogTreasuryProductTokenSet (uint256 productId, uint256 riskpoolId, address erc20Address);
event LogTreasuryInstanceWalletSet (address walletAddress);
event LogTreasuryRiskpoolWalletSet (uint256 riskpoolId, address walletAddress);
event LogTreasuryProductTokenSet(uint256 productId, uint256 riskpoolId, address erc20Address);
event LogTreasuryInstanceWalletSet(address walletAddress);
event LogTreasuryRiskpoolWalletSet(uint256 riskpoolId, address walletAddress);

event LogTreasuryPremiumTransferred (address from, address riskpoolWalletAddress, uint256 amount, bool success);
event LogTreasuryCapitalTransferred (address from, address riskpoolWalletAddress, uint256 amount, bool success);
event LogTreasuryFeesTransferred (address from, address instanceWalletAddress, uint256 amount, bool success);
event LogTreasuryPremiumFeesSet(uint256 productId, uint256 fixedFee, uint256 fractionalFee);
event LogTreasuryCapitalFeesSet(uint256 riskpoolId, uint256 fixedFee, uint256 fractionalFee);

event LogTreasuryPremiumFeesSet (uint256 productId, uint256 fixedFee, uint256 fractionalFee);
event LogTreasuryCapitalFeesSet (uint256 riskpoolId, uint256 fixedFee, uint256 fractionalFee);
event LogTreasuryPremiumTransferred(address from, address riskpoolWalletAddress, uint256 amount, bool success);
event LogTreasuryCapitalTransferred(address from, address riskpoolWalletAddress, uint256 amount, bool success);
event LogTreasuryFeesTransferred(address from, address instanceWalletAddress, uint256 amount, bool success);
event LogTreasuryWithdrawalTransferred(address riskpoolWalletAddress, address to, uint256 amount, bool success);

event LogTreasuryPremiumProcessed (bytes32 processId, uint256 amount, bool success);
event LogTreasuryCapitalProcessed (uint256 riskpoolId, uint256 bundleId, uint256 amount, bool success);
event LogTreasuryPremiumProcessed(bytes32 processId, uint256 amount, bool success);
event LogTreasuryCapitalProcessed(uint256 riskpoolId, uint256 bundleId, uint256 amount, bool success);
event LogTreasuryWithdrawalProcessed(uint256 riskpoolId, uint256 bundleId, uint256 amount, bool success);

struct FeeSpecification {
uint256 componentId;
Expand Down Expand Up @@ -56,7 +58,7 @@ interface ITreasury {
uint256 netCapitalAmount
);

function processWithdrawl(uint256 bundleId, uint256 amount) external
function processWithdrawal(uint256 bundleId, uint256 amount) external
returns(
bool success,
uint256 netAmount
Expand Down
1 change: 1 addition & 0 deletions contracts/services/IRiskpoolService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface IRiskpoolService {
function lockBundle(uint256 bundleId) external;
function unlockBundle(uint256 bundleId) external;
function closeBundle(uint256 bundleId) external;
function burnBundle(uint256 bundleId) external;

function collateralizePolicy(uint256 bundleId, bytes32 processId, uint256 collateralAmount) external;
function releasePolicy(uint256 bundleId, bytes32 processId) external returns(uint256 collateralAmount);
Expand Down

0 comments on commit 2a59585

Please sign in to comment.