Skip to content

Commit

Permalink
Merge branch 'bit-country:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
chexware authored Dec 20, 2023
2 parents 71732d6 + 8a3324e commit 1169c1b
Show file tree
Hide file tree
Showing 75 changed files with 5,618 additions and 927 deletions.
108 changes: 108 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 45 additions & 44 deletions Cargo.toml

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ build-docker-pioneer:
.PHONY: run-dev
run-dev:
./target/release/metaverse-node purge-chain --dev
./target/release/metaverse-node --dev --tmp --alice -lruntime=debug
./target/release/metaverse-node --dev --tmp --alice --node-key 0000000000000000000000000000000000000000000000000000000000000001 -lruntime=debug

.PHONY: run-bob-dev
run-bob-dev:
./target/release/metaverse-node --dev --tmp --bob --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp -lruntime=debug

.PHONY: run-chopsticks-pioneer
run-chopsticks-pioneer:
Expand Down
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<p align="center">
<img src="https://github.com/bit-country/Metaverse-Network/blob/master/node/res/bm-logo.png?raw=true" width="200">
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/w3f/General-Grants-Program/master/src/badge_black.svg" width="530">
</p>

<div align="center">
<h1>[Bit.Country] Metaverse.Network</h1>
<h1>MNET (Metaverse.Network) by BitCountry team</h1>

## Start your own metaverse. An Ethereum-compatible Network for Metaverses & Games
## An Ethereum-compatible Blockchain Network Built using Substrate

[![Substrate version](https://img.shields.io/badge/Substrate-3.0.0-brightgreen?logo=Parity%20Substrate)](https://substrate.dev/)
[![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Fbitdotcountry)](https://twitter.com/bitdotcountry)
Expand All @@ -30,10 +22,7 @@ Development Note: It is still a WIP.

# 1. Introduction

Metaverse Network is an EVM-enabled blockchain network for user-created metaverses and games.

Everyone can start their own metaverse for their people with the 3D world, NFTs, play-to-earn & build communities to
earn, and takes community engagement to a new dimension on web3.0.
MNET (Metaverse.Network), featuring a seamlessly integrated enriched social layer, stands as an interesting blockchain ecosystem that extends support for both EVM (Ethereum Virtual Machine) and WASM (WebAssembly) smart contracts. This framework empowers developers to harness the network's capabilities in crafting decentralized applications (dApps) with unparalleled versatility and functionality.

# 2. Build

Expand Down Expand Up @@ -105,3 +94,8 @@ cargo run -- \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
--validator
```

<p align="center">
<img src="https://raw.githubusercontent.com/w3f/General-Grants-Program/master/src/badge_black.svg" width="530">
</p>

18 changes: 11 additions & 7 deletions modules/bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use sp_core::{H160, U256};
use sp_std::prelude::*;

pub use pallet::*;
use primitives::{Balance, FungibleTokenId};
use primitives::FungibleTokenId;

pub type ResourceId = H160;
pub type ChainId = u8;
Expand All @@ -29,12 +29,12 @@ pub mod pallet {
use frame_support::traits::{Currency, ExistenceRequirement, LockableCurrency, ReservableCurrency};
use frame_support::PalletId;
use orml_traits::MultiCurrency;
use sp_arithmetic::traits::{CheckedMul, Saturating, Zero};
use sp_runtime::traits::{AccountIdConversion, CheckedDiv};
use sp_runtime::{ArithmeticError, ModuleError};
use sp_arithmetic::traits::{Saturating, Zero};
use sp_runtime::traits::AccountIdConversion;
use sp_runtime::ModuleError;

use core_primitives::NFTTrait;
use primitives::evm::CurrencyIdType::FungibleToken;

use primitives::{Attributes, ClassId, NftMetadata, TokenId};

use super::*;
Expand Down Expand Up @@ -300,7 +300,11 @@ pub mod pallet {
Ok(())
}
Err(err) => match err {
DispatchError::Module(ModuleError { index, error, message }) => {
DispatchError::Module(ModuleError {
index: _,
error: _,
message,
}) => {
if message == Some("AssetInfoNotFound") {
if let Ok(_mint_succeeded) =
T::NFTHandler::mint_token_with_id(&to, class_id, token_id, metadata, Attributes::new())
Expand Down Expand Up @@ -335,7 +339,7 @@ pub mod pallet {
let bridge_id = T::PalletId::get().into_account_truncating();

ensure!(BridgeFee::<T>::contains_key(&chain_id), Error::<T>::FeeOptionsMissing);
let (min_fee, fee_scale) = Self::bridge_fee(chain_id);
let (min_fee, _fee_scale) = Self::bridge_fee(chain_id);

T::Currency::transfer(&source, &bridge_id, min_fee.into(), ExistenceRequirement::AllowDeath)?;

Expand Down
Loading

0 comments on commit 1169c1b

Please sign in to comment.