update: smart contracts

This commit is contained in:
venuswhispers
2024-08-29 10:14:12 +08:00
parent f6b3f4a247
commit 4b0d1a2a5b
7 changed files with 67 additions and 61 deletions
+9 -9
View File
@@ -4,20 +4,20 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
██╗ ██╗ ██╗██╗ ██╗ ██████╗ ██████╗ ██╗██████╗ ██████╗ ███████╗
██║ ██║ ██║╚██╗██╔╝ ██╔══██╗██╔══██╗██║██╔══██╗██╔════╝ ██╔════╝
██║ ██║ ██║ ╚███╔╝ ██████╔╝██████╔╝██║██║ ██║██║ ███╗█████╗
██║ ██║ ██║ ██╔██╗ ██╔══██╗██╔══██╗██║██║ ██║██║ ██║██╔══╝
███████╗╚██████╔╝██╔╝ ██╗ ██████╔╝██║ ██║██║██████╔╝╚██████╔╝███████╗
╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═════╝ ╚═════╝ ╚══════╝
*/
import "./ERC20B.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "hardhat/console.sol";
/** __ ____ ______ __ __
/\ \ /\ _`\ /\__ _\/\ \/\ \
\ \ \ __ __ __ _\ \ \L\_\/_/\ \/\ \ \_\ \
\ \ \ __/\ \/\ \/\ \/'\\ \ _\L \ \ \ \ \ _ \
\ \ \L\ \ \ \_\ \/> </ \ \ \L\ \ \ \ \ \ \ \ \ \
\ \____/\ \____//\_/\_\ \ \____/ \ \_\ \ \_\ \_\
\/___/ \/___/ \//\/_/ \/___/ \/_/ \/_/\/_/
*/
contract Bridge is Ownable, AccessControl {
uint256 internal fee = 0; //zero default
uint256 public feeRate = 10 * (uint256(10) ** 15); // Fee rate 1%
+9 -10
View File
@@ -1,16 +1,15 @@
/*
___ ___ ___ ___ ___
|\ \ |\ \|\ \ |\ \ / /|
\ \ \ \ \ \\\ \ \ \ \/ / |
\ \ \ \ \ \\\ \ \ \ / /
\ \ \____\ \ \\\ \ / \/
\ \_______\ \_______\/ /\ \
\|_______|\|_______/__/ /\ __\
|__|/ \|__|
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
██╗ ██╗ ██╗██╗ ██╗ ████████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗
██║ ██║ ██║╚██╗██╔╝ ╚══██╔══╝██╔═══██╗██║ ██╔╝██╔════╝████╗ ██║
██║ ██║ ██║ ╚███╔╝ ██║ ██║ ██║█████╔╝ █████╗ ██╔██╗ ██║
██║ ██║ ██║ ██╔██╗ ██║ ██║ ██║██╔═██╗ ██╔══╝ ██║╚██╗██║
███████╗╚██████╔╝██╔╝ ██╗ ██║ ╚██████╔╝██║ ██╗███████╗██║ ╚████║
╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝
*/
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
+10 -11
View File
@@ -4,20 +4,19 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
██╗ ██╗ ██╗██╗ ██╗ ██████╗ ████████╗ ██████╗
██║ ██║ ██║╚██╗██╔╝ ██╔══██╗╚══██╔══╝██╔════╝
██║ ██║ ██║ ╚███╔╝ ██████╔╝ ██║ ██║
██║ ██║ ██║ ██╔██╗ ██╔══██╗ ██║ ██║
███████╗╚██████╔╝██╔╝ ██╗ ██████╔╝ ██║ ╚██████╗
╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝
*/
import "./ERC20B.sol";
/*
__ ____ ______ ____
/\ \ /\ _`\ /\__ _\/\ _`\
\ \ \ __ __ __ _\ \ \L\ \/_/\ \/\ \ \/\_\
\ \ \ __/\ \/\ \/\ \/'\\ \ _ <' \ \ \ \ \ \/_/_
\ \ \L\ \ \ \_\ \/> </ \ \ \L\ \ \ \ \ \ \ \L\ \
\ \____/\ \____//\_/\_\ \ \____/ \ \_\ \ \____/
\/___/ \/___/ \//\/_/ \/___/ \/_/ \/___/
*/
contract LuxBTC is ERC20B {
string public constant _name = "LuxBTC";
string public constant _name = "Lux BTC";
string public constant _symbol = "LBTC";
constructor() ERC20B(_name, _symbol) {}
+10 -10
View File
@@ -4,19 +4,19 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/*
██╗ ██╗ ██╗██╗ ██╗ ███████╗████████╗██╗ ██╗
██║ ██║ ██║╚██╗██╔╝ ██╔════╝╚══██╔══╝██║ ██║
██║ ██║ ██║ ╚███╔╝ █████╗ ██║ ███████║
██║ ██║ ██║ ██╔██╗ ██╔══╝ ██║ ██╔══██║
███████╗╚██████╔╝██╔╝ ██╗ ███████╗ ██║ ██║ ██║
╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝
*/
import "./ERC20B.sol";
/* __ ____ ______ __ __
/\ \ /\ _`\ /\__ _\/\ \/\ \
\ \ \ __ __ __ _\ \ \L\_\/_/\ \/\ \ \_\ \
\ \ \ __/\ \/\ \/\ \/'\\ \ _\L \ \ \ \ \ _ \
\ \ \L\ \ \ \_\ \/> </ \ \ \L\ \ \ \ \ \ \ \ \ \
\ \____/\ \____//\_/\_\ \ \____/ \ \_\ \ \_\ \_\
\/___/ \/___/ \//\/_/ \/___/ \/_/ \/_/\/_/
*/
contract LuxETH is ERC20B {
string public constant _name = "LuxETH";
string public constant _name = "Lux ETH";
string public constant _symbol = "LETH";
constructor() ERC20B(_name, _symbol) {}
+28
View File
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
██╗ ██╗ ██╗██╗ ██╗ ██╗ ██╗███████╗██████╗
██║ ██║ ██║╚██╗██╔╝ ██║ ██║██╔════╝██╔══██╗
██║ ██║ ██║ ╚███╔╝ ██║ ██║███████╗██║ ██║
██║ ██║ ██║ ██╔██╗ ██║ ██║╚════██║██║ ██║
███████╗╚██████╔╝██╔╝ ██╗ ╚██████╔╝███████║██████╔╝
╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═════╝
*/
import "./ERC20B.sol";
contract LUSD is ERC20B {
string public constant _name = "Lux Dollar";
string public constant _symbol = "LUSD";
constructor() ERC20B(_name, _symbol) {}
function mint(address account, uint256 amount) public {
_mint(account, amount);
}
function burn(address account, uint256 amount) public {
_burn(account, amount);
}
}
-20
View File
@@ -1,20 +0,0 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "./ERC20B.sol";
/*
___ ___ ___ ___ ___
|\ \ |\ \|\ \ |\ \ / /|
\ \ \ \ \ \\\ \ \ \ \/ / |
\ \ \ \ \ \\\ \ \ \ / /
\ \ \____\ \ \\\ \ / \/
\ \_______\ \_______\/ /\ \
\|_______|\|_______/__/ /\ __\
|__|/ \|__|
*/
contract LUXD is ERC20B {
string public constant _name = "Lux Dollar";
string public constant _symbol = "LUXD";
constructor() ERC20B(_name, _symbol) {}
}
+1 -1
View File
@@ -4,7 +4,7 @@ metadata:
name: caddyfile
data:
Caddyfile: |
:80 {
teleport.lux.network {
# Handle requests to /node0 and its subpaths
handle_path /node0* {
reverse_proxy mpc-node-0:6000