-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* inflation supports polygon destination * Update contracts/root/PolygonDestination.sol * fix test --------- Co-authored-by: mzxyz <[email protected]>
- Loading branch information
Showing
12 changed files
with
239 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (C) 2020-2023 SubQuery Pte Ltd authors & contributors | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity 0.8.15; | ||
|
||
import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; | ||
import {IInflationDestination} from "../root/IInflationDestination.sol"; | ||
|
||
contract MockInflationDestination is IInflationDestination, ERC165 { | ||
event HookCalled(); | ||
constructor() { | ||
} | ||
|
||
/** | ||
* @notice Check ERC165 interface | ||
* @param interfaceId interface ID | ||
* @return Result of support or not | ||
*/ | ||
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165) returns (bool) { | ||
return interfaceId == type(IInflationDestination).interfaceId || super.supportsInterface(interfaceId); | ||
} | ||
|
||
function afterReceiveInflatedTokens(uint256 tokenAmount) external { | ||
emit HookCalled(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright (C) 2020-2023 SubQuery Pte Ltd authors & contributors | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity 0.8.15; | ||
|
||
import {IInflationDestination} from "../root/IInflationDestination.sol"; | ||
|
||
contract MockInflationDestination2 { | ||
constructor() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.