@@ -6,6 +6,7 @@ import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
6
6
7
7
import {IBridgeGateway} from "../../_interfaces/IBridgeGateway.sol " ;
8
8
import {IXCAmpleController} from "../../_interfaces/IXCAmpleController.sol " ;
9
+ import {IXCAmpleControllerGateway} from "../../_interfaces/IXCAmpleControllerGateway.sol " ;
9
10
import {IXCAmple} from "../../_interfaces/IXCAmple.sol " ;
10
11
11
12
/**
@@ -45,7 +46,6 @@ contract ChainBridgeXCAmpleGateway is IBridgeGateway, Ownable {
45
46
function reportRebase (uint256 globalAmpleforthEpoch , uint256 globalAMPLSupply )
46
47
external
47
48
onlyOwner
48
- returns (bool )
49
49
{
50
50
uint256 recordedGlobalAmpleforthEpoch = IXCAmpleController (xcController)
51
51
.globalAmpleforthEpoch ();
@@ -59,9 +59,10 @@ contract ChainBridgeXCAmpleGateway is IBridgeGateway, Ownable {
59
59
recordedGlobalAMPLSupply
60
60
);
61
61
62
- IXCAmpleController (xcController).reportRebase (globalAmpleforthEpoch, globalAMPLSupply);
63
-
64
- return true ;
62
+ IXCAmpleControllerGateway (xcController).reportRebase (
63
+ globalAmpleforthEpoch,
64
+ globalAMPLSupply
65
+ );
65
66
}
66
67
67
68
/**
@@ -78,15 +79,13 @@ contract ChainBridgeXCAmpleGateway is IBridgeGateway, Ownable {
78
79
address recipient ,
79
80
uint256 amount ,
80
81
uint256 globalAMPLSupply
81
- ) external onlyOwner returns ( bool ) {
82
+ ) external onlyOwner {
82
83
uint256 recordedGlobalAMPLSupply = IXCAmple (xcAmple).globalAMPLSupply ();
83
84
uint256 mintAmount = amount.mul (recordedGlobalAMPLSupply).div (globalAMPLSupply);
84
85
85
86
emit XCTransferIn (recipient, globalAMPLSupply, mintAmount, recordedGlobalAMPLSupply);
86
87
87
- IXCAmpleController (xcController).mint (recipient, mintAmount);
88
-
89
- return true ;
88
+ IXCAmpleControllerGateway (xcController).mint (recipient, mintAmount);
90
89
}
91
90
92
91
/**
@@ -101,18 +100,16 @@ contract ChainBridgeXCAmpleGateway is IBridgeGateway, Ownable {
101
100
address recipientAddressInTargetChain ,
102
101
uint256 amount ,
103
102
uint256 globalAMPLSupply
104
- ) external onlyOwner returns ( bool ) {
103
+ ) external onlyOwner {
105
104
uint256 recordedGlobalAMPLSupply = IXCAmple (xcAmple).globalAMPLSupply ();
106
105
require (
107
106
globalAMPLSupply == recordedGlobalAMPLSupply,
108
107
"ChainBridgeXCAmpleGateway: total supply not consistent "
109
108
);
110
109
111
- IXCAmpleController (xcController).burn (sender, amount);
110
+ IXCAmpleControllerGateway (xcController).burn (sender, amount);
112
111
113
112
emit XCTransferOut (sender, amount, recordedGlobalAMPLSupply);
114
-
115
- return true ;
116
113
}
117
114
118
115
constructor (
0 commit comments