-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add contracts * add ens * update erc721 * Add AssetsBridgeErc20 contracts * Add ens contracts * Add chainx mainnet * remove notes Co-authored-by: NingBo Wang <2536935847@qq.com> Co-authored-by: icodezjb <icodezjb@users.noreply.github.com>
- Loading branch information
1 parent
5c9399a
commit caca57a
Showing
54 changed files
with
11,742 additions
and
0 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,53 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/utils/Context.sol"; | ||
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/access/Ownable.sol"; | ||
|
||
/** | ||
* @dev Interface of the SherpaX AssetsBridge | ||
*/ | ||
interface IAssetsBridge { | ||
/* | ||
* @dev mint the token to account for assets bridge admin. | ||
* @param account The receiver of token. | ||
* @param amount The amount of token. | ||
*/ | ||
function mint_into(address account, uint256 amount) external returns (bool); | ||
|
||
/* | ||
* @dev burn the token from account for assets bridge admin. | ||
* @param account The owner of token. | ||
* @param amount The amount of token. | ||
*/ | ||
function burn_from(address account, uint256 amount) external returns (bool); | ||
} | ||
|
||
abstract contract AssetsBridgeAdmin is Context { | ||
address public constant admin = 0x1111111111111111111111111111111111111111; | ||
|
||
modifier AssetsBridgeRequire() { | ||
require(_msgSender() == admin, "AssetsBridge: require called by the assets bridge admin address"); | ||
|
||
_; | ||
} | ||
} | ||
|
||
abstract contract AssetsBridgeOwner is Context, Ownable { | ||
modifier AssetsBridgeRequire() { | ||
require(_msgSender() == owner(), "AssetsBridge: require called by owner"); | ||
|
||
_; | ||
} | ||
} | ||
|
||
abstract contract AssetsBridgeAdminOrOwner is Context, Ownable { | ||
address public constant admin = 0x1111111111111111111111111111111111111111; | ||
|
||
modifier AssetsBridgeRequire() { | ||
require(_msgSender() == owner() || _msgSender() == admin, "AssetsBridge: require called by owner or admin"); | ||
|
||
_; | ||
} | ||
} |
Oops, something went wrong.