mint FeeRebateToken on first DOT<>TBTC swap
@@ -2,6 +2,7 @@ pragma solidity ^0.5.10;
import {SafeMath} from "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol";
import {DepositOwnerToken} from "./DepositOwnerToken.sol";
+import {FeeRebateToken} from "./DepositOwnerToken.sol";
import {TBTCToken} from "./TBTCToken.sol";
import {TBTCConstants} from "../deposit/TBTCConstants.sol";
import {DepositUtils} from "../deposit/DepositUtils.sol";
@@ -12,13 +13,16 @@ contract VendingMachine {
TBTCToken tbtcToken;
DepositOwnerToken depositOwnerToken;
+ FeeRebateToken feeRebateToken;
constructor(
address _tbtcToken,
- address _depositOwnerToken
+ address _depositOwnerToken,
+ address _feeRebateToken
) public {
tbtcToken = TBTCToken(_tbtcToken);
depositOwnerToken = DepositOwnerToken(_depositOwnerToken);
+ feeRebateToken = FeeRebateToken(_feeRebateToken);
}
/// @notice Determines whether a deposit is qualified for minting TBTC.
@@ -60,6 +64,11 @@ contract VendingMachine {
else{
tbtcToken.mint(msg.sender, getDepositValue());
}
+
+ // owner of the DOT durin first TBTC mint receives the FRT
+ if(!feeRebateToken.exists(_dotId)){
+ feeRebateToken.mint(msg.sender, _dotId);
+ }
}
// WRAPPERS
