Skip to content

Commit

Permalink
Merge pull request #351 from luxfi/feat/bridge2
Browse files Browse the repository at this point in the history
added: trump & melania tokens added
  • Loading branch information
venuswhispers authored Jan 20, 2025
2 parents 478ba8f + 613a836 commit 7b5b0fa
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 9 deletions.
4 changes: 4 additions & 0 deletions app/bridge/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ module.exports = (phase, { defaultConfig }) => {
hostname: 'img.youtube.com',
pathname: '**',
},
{
protocol: "https",
hostname: "arweave.net",
},
{
protocol: "http",
hostname: "localhost",
Expand Down
58 changes: 53 additions & 5 deletions app/server/src/domain/settings/mainnet/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default [
{
"name": "Official Trump",
"asset": "TRUMP",
"logo": "https://arweave.net/VQrPjACwnQRmxdKBTqNwPiyo65x7LAT773t8Kd7YBzw",
"logo": "https://cdn.lux.network/bridge/currencies/trump.webp",
"contract_address": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"decimals": 6,
"status": "active",
Expand All @@ -130,6 +130,22 @@ export default [
"source_base_fee": 0,
"destination_base_fee": 0,
},
{
"name": "Melania Meme",
"asset": "MELANIA",
"logo": "https://cdn.lux.network/bridge/currencies/melania.jfif",
"contract_address": "FUAfBo2jgks6gB4Z4LfZkqSZgzNucisEHqnNebaRxM1P",
"decimals": 6,
"status": "active",
"is_deposit_enabled": false,
"is_withdrawal_enabled": false,
"is_refuel_enabled": false,
"max_withdrawal_amount": 0,
"deposit_fee": 0,
"withdrawal_fee": 0.01,
"source_base_fee": 0,
"destination_base_fee": 0,
},
{
"name": "Z",
"asset": "Z",
Expand Down Expand Up @@ -803,7 +819,7 @@ export default [
{
"name": "Official Trump",
"asset": "TRUMP",
"logo": "https://arweave.net/VQrPjACwnQRmxdKBTqNwPiyo65x7LAT773t8Kd7YBzw",
"logo": "https://cdn.lux.network/bridge/currencies/trump.webp",
"contract_address": "0x768972Ee4038a23b20B3beD3848027460172D897",
"decimals": 6,
"status": "active",
Expand All @@ -816,11 +832,27 @@ export default [
"source_base_fee": 0,
"destination_base_fee": 0,
},
{
"name": "Melania Meme",
"asset": "MELANIA",
"logo": "https://cdn.lux.network/bridge/currencies/melania.jfif",
"contract_address": "0x14F48A55722ecBa725aA83a294a8d3E8bE47DE46",
"decimals": 6,
"status": "active",
"is_deposit_enabled": false,
"is_withdrawal_enabled": false,
"is_refuel_enabled": false,
"max_withdrawal_amount": 0,
"deposit_fee": 0,
"withdrawal_fee": 0.01,
"source_base_fee": 0,
"destination_base_fee": 0,
},
{
"name": "Z",
"asset": "Z",
"logo": "https://cdn.lux.network/bridge/currencies/zeekay.jpeg",
"contract_address": "0x768972Ee4038a23b20B3beD3848027460172D897",
"contract_address": "0xA69E6612B525474CB893500b70FD7Ec374CbF9a3",
"decimals": 6,
"status": "active",
"is_deposit_enabled": false,
Expand Down Expand Up @@ -1416,7 +1448,7 @@ export default [
{
"name": "Official Trump",
"asset": "TRUMP",
"logo": "https://arweave.net/VQrPjACwnQRmxdKBTqNwPiyo65x7LAT773t8Kd7YBzw",
"logo": "https://cdn.lux.network/bridge/currencies/trump.webp",
"contract_address": "0x768972Ee4038a23b20B3beD3848027460172D897",
"decimals": 6,
"status": "active",
Expand All @@ -1429,11 +1461,27 @@ export default [
"source_base_fee": 0,
"destination_base_fee": 0,
},
{
"name": "Melania Meme",
"asset": "MELANIA",
"logo": "https://cdn.lux.network/bridge/currencies/melania.jfif",
"contract_address": "0x14F48A55722ecBa725aA83a294a8d3E8bE47DE46",
"decimals": 6,
"status": "active",
"is_deposit_enabled": false,
"is_withdrawal_enabled": false,
"is_refuel_enabled": false,
"max_withdrawal_amount": 0,
"deposit_fee": 0,
"withdrawal_fee": 0.01,
"source_base_fee": 0,
"destination_base_fee": 0,
},
{
"name": "Z",
"asset": "Z",
"logo": "https://cdn.lux.network/bridge/currencies/zeekay.jpeg",
"contract_address": "0x768972Ee4038a23b20B3beD3848027460172D897",
"contract_address": "0xA69E6612B525474CB893500b70FD7Ec374CbF9a3",
"decimals": 6,
"status": "active",
"is_deposit_enabled": false,
Expand Down
32 changes: 32 additions & 0 deletions contracts/contracts/zoo/MELANIA.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/**
███╗ ███╗███████╗██╗ █████╗ ███╗ ██╗██╗ █████╗
████╗ ████║██╔════╝██║ ██╔══██╗████╗ ██║██║██╔══██╗
██╔████╔██║█████╗ ██║ ███████║██╔██╗ ██║██║███████║
██║╚██╔╝██║██╔══╝ ██║ ██╔══██║██║╚██╗██║██║██╔══██║
██║ ╚═╝ ██║███████╗███████╗██║ ██║██║ ╚████║██║██║ ██║
╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝
*/

import "../ERC20B.sol";

contract MELANIA is ERC20B {
string public constant _name = "Melania Meme";
string public constant _symbol = "MELANIA";

constructor() ERC20B(_name, _symbol) {}

function decimals() public view virtual override returns (uint8) {
return 6;
}

function mint(address account, uint256 amount) public {
_mint(account, amount);
}

function burn(address account, uint256 amount) public {
_burn(account, amount);
}
}
1 change: 1 addition & 0 deletions mpc-nodes/docker/common/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/node": "^22.4.1",
"@types/web3": "^1.0.20",
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.2.0",
"eslint": "^8.57.0",
Expand Down
51 changes: 49 additions & 2 deletions mpc-nodes/docker/common/node/src/config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,28 @@ export const MAIN_NETWORKS: NETWORK[] = [
contract_address: "0x408E5681E209d37FD52c76cF9ee7EfFA8476cd9a",
decimals: 18,
is_native: false
}
},
{
name: "Official Trump",
asset: "TRUMP",
contract_address: "0x768972Ee4038a23b20B3beD3848027460172D897",
decimals: 6,
is_native: false
},
{
name: "Melania Meme",
asset: "MELANIA",
contract_address: "0x14F48A55722ecBa725aA83a294a8d3E8bE47DE46",
decimals: 6,
is_native: false
},
{
name: "Z",
asset: "Z",
contract_address: "0xA69E6612B525474CB893500b70FD7Ec374CbF9a3",
decimals: 6,
is_native: false
},
]
},
{
Expand Down Expand Up @@ -513,7 +534,28 @@ export const MAIN_NETWORKS: NETWORK[] = [
contract_address: "0x137747A15dE042Cd01fCB41a5F3C7391d932750B",
decimals: 18,
is_native: false
}
},
{
name: "Official Trump",
asset: "TRUMP",
contract_address: "0x768972Ee4038a23b20B3beD3848027460172D897",
decimals: 6,
is_native: false
},
{
name: "Melania Meme",
asset: "MELANIA",
contract_address: "0x14F48A55722ecBa725aA83a294a8d3E8bE47DE46",
decimals: 6,
is_native: false
},
{
name: "Z",
asset: "Z",
contract_address: "0xA69E6612B525474CB893500b70FD7Ec374CbF9a3",
decimals: 6,
is_native: false
},
]
},
{
Expand Down Expand Up @@ -1809,6 +1851,11 @@ export const SWAP_PAIRS: Record<string, string[]> = {
ZDOGS: ["LDOGS"],
ZMRB: ["LMRB"],
ZREDO: ["LREDO"],

// Lux & Zoo tokens
TRUMP: ["TRUMP"],
MELANIA: ["MELANIA"],
Z: ["Z"],

// Evm tokens
ETH: ["LETH", "ZETH"],
Expand Down
9 changes: 7 additions & 2 deletions mpc-nodes/docker/common/node/src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ app.post("/api/v1/generate_mpc_sig", signDataValidator, async (req: Request, res
msg: `Unmatched Network Type Error: Src and Dst chains' types are not matched.`
})
return
} else if (fromNetwork.internal_name === toNetwork.internal_name) {
res.json({
status: false,
msg: `Source and Destination networks are same`
})
return
}
// get Web3Form using rpc url of specific network
const web3Form = getWeb3FormForRPC(fromNetwork.node)
Expand Down Expand Up @@ -377,8 +383,7 @@ const getEvmTransactionUsingTxId = async (txId: string, w3From: Web3<RegisteredS
const iface = new Interface(abi)
const eventLog = tx.logs

//@ts-expect-error "_event type not matching"
const _logs = await Promise.all(eventLog.map((e) => iface.parseLog(e)))
const _logs = await Promise.all(eventLog.map((e: any) => iface.parseLog(e)))
const _log = _logs.filter((l) => l !== null)[0]

if (!_log) {
Expand Down

0 comments on commit 7b5b0fa

Please sign in to comment.