mirror of
https://github.com/luxfi/bridge.git
synced 2026-09-24 00:26:46 +00:00
udpate: vault and bridge
This commit is contained in:
@@ -936,8 +936,8 @@ export const CONTRACTS = {
|
||||
},
|
||||
8888: {
|
||||
chain_id: 8888,
|
||||
teleporter: "0x46390FA219b22f739C63F0bF1c165a1FBc30B57c",
|
||||
vault: "0xA563ebea2Cd4895559D64b1945943D370F5336d4",
|
||||
teleporter: "0x6CF6aFF7CcfF500AcEAeb308Ce52cc31e9393d71",
|
||||
vault: "0x1044d0f16b46D6f0E300bC28C27101Ca099301CA",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ contract Bridge is Ownable, AccessControl {
|
||||
address internal payoutAddr;
|
||||
LuxVault public vault;
|
||||
/** Events */
|
||||
event BridgeBurned(address caller, uint256 amt);
|
||||
event BridgeBurned(address caller, uint256 amt, address token);
|
||||
event VaultDeposit(address depositor, uint256 amt, address token);
|
||||
event VaultWithdraw(address receiver, uint256 amt, address token);
|
||||
event BridgeMinted(address recipient, address token, uint256 amt);
|
||||
@@ -218,9 +218,9 @@ contract Bridge is Ownable, AccessControl {
|
||||
function bridgeBurn(uint256 amount_, address tokenAddr_) public {
|
||||
TeleportStruct memory teleport;
|
||||
teleport.token = ERC20B(tokenAddr_);
|
||||
require((teleport.token.balanceOf(msg.sender) > 0), "Zero Balance");
|
||||
require((teleport.token.balanceOf(msg.sender) >= amount_), "Insufficient token balance");
|
||||
teleport.token.bridgeBurn(msg.sender, amount_);
|
||||
emit BridgeBurned(msg.sender, amount_);
|
||||
emit BridgeBurned(msg.sender, amount_, tokenAddr_);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
import { ethers } from "hardhat";
|
||||
|
||||
async function main() {
|
||||
const [deployer] = await ethers.getSigners();
|
||||
const [deployer] = await ethers.getSigners();
|
||||
|
||||
/////LuxVault
|
||||
const assets = [] as any[];
|
||||
|
||||
/////LuxVault
|
||||
const assets = [] as any[]
|
||||
|
||||
|
||||
const _signer = await ethers.getContractFactory("LuxVault");
|
||||
const _vault = await _signer.deploy(assets);
|
||||
await _vault.waitForDeployment();
|
||||
console.log("LuxVault address on luxTestnet:", await _vault.getAddress());
|
||||
const _signer = await ethers.getContractFactory("LuxVault");
|
||||
const _vault = await _signer.deploy(assets);
|
||||
await _vault.waitForDeployment();
|
||||
console.log("LuxVault address on luxTestnet:", await _vault.getAddress());
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => process.exit(0))
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
.then(() => process.exit(0))
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user