@@ -6,6 +6,7 @@ import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
66
77import {IBridgeGateway} from "../../_interfaces/IBridgeGateway.sol " ;
88import {IXCAmpleController} from "../../_interfaces/IXCAmpleController.sol " ;
9+ import {IXCAmpleControllerGateway} from "../../_interfaces/IXCAmpleControllerGateway.sol " ;
910import {IXCAmple} from "../../_interfaces/IXCAmple.sol " ;
1011
1112/**
@@ -45,7 +46,6 @@ contract ChainBridgeXCAmpleGateway is IBridgeGateway, Ownable {
4546 function reportRebase (uint256 globalAmpleforthEpoch , uint256 globalAMPLSupply )
4647 external
4748 onlyOwner
48- returns (bool )
4949 {
5050 uint256 recordedGlobalAmpleforthEpoch = IXCAmpleController (xcController)
5151 .globalAmpleforthEpoch ();
@@ -59,9 +59,10 @@ contract ChainBridgeXCAmpleGateway is IBridgeGateway, Ownable {
5959 recordedGlobalAMPLSupply
6060 );
6161
62- IXCAmpleController (xcController).reportRebase (globalAmpleforthEpoch, globalAMPLSupply);
63-
64- return true ;
62+ IXCAmpleControllerGateway (xcController).reportRebase (
63+ globalAmpleforthEpoch,
64+ globalAMPLSupply
65+ );
6566 }
6667
6768 /**
@@ -78,15 +79,13 @@ contract ChainBridgeXCAmpleGateway is IBridgeGateway, Ownable {
7879 address recipient ,
7980 uint256 amount ,
8081 uint256 globalAMPLSupply
81- ) external onlyOwner returns ( bool ) {
82+ ) external onlyOwner {
8283 uint256 recordedGlobalAMPLSupply = IXCAmple (xcAmple).globalAMPLSupply ();
8384 uint256 mintAmount = amount.mul (recordedGlobalAMPLSupply).div (globalAMPLSupply);
8485
8586 emit XCTransferIn (recipient, globalAMPLSupply, mintAmount, recordedGlobalAMPLSupply);
8687
87- IXCAmpleController (xcController).mint (recipient, mintAmount);
88-
89- return true ;
88+ IXCAmpleControllerGateway (xcController).mint (recipient, mintAmount);
9089 }
9190
9291 /**
@@ -101,18 +100,16 @@ contract ChainBridgeXCAmpleGateway is IBridgeGateway, Ownable {
101100 address recipientAddressInTargetChain ,
102101 uint256 amount ,
103102 uint256 globalAMPLSupply
104- ) external onlyOwner returns ( bool ) {
103+ ) external onlyOwner {
105104 uint256 recordedGlobalAMPLSupply = IXCAmple (xcAmple).globalAMPLSupply ();
106105 require (
107106 globalAMPLSupply == recordedGlobalAMPLSupply,
108107 "ChainBridgeXCAmpleGateway: total supply not consistent "
109108 );
110109
111- IXCAmpleController (xcController).burn (sender, amount);
110+ IXCAmpleControllerGateway (xcController).burn (sender, amount);
112111
113112 emit XCTransferOut (sender, amount, recordedGlobalAMPLSupply);
114-
115- return true ;
116113 }
117114
118115 constructor (
0 commit comments