Skip to content

Commit

Permalink
Merge pull request #975 from Setheum-Labs/qingdao1
Browse files Browse the repository at this point in the history
Qingdao1
  • Loading branch information
balqaasem authored Feb 13, 2024
2 parents cd60bb0 + 59aefcf commit ba4421d
Show file tree
Hide file tree
Showing 226 changed files with 126 additions and 811 deletions.
12 changes: 6 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "highway/predeploy-contracts"]
path = highway/predeploy-contracts
[submodule "blockchain/submodules/predeploy-contracts"]
path = blockchain/submodules/predeploy-contracts
url = https://github.com/Setheum-Labs/predeploy-contracts.git
[submodule "highway/EthicalDeFi"]
path = highway/EthicalDeFi
[submodule "blockchain/submodules/EthicalDeFi"]
path = blockchain/submodules/EthicalDeFi
url = https://Setheum-Labs/EthicalDeFi.git
[submodule "highway/orml"]
path = highway/orml
[submodule "blockchain/submodules/orml"]
path = blockchain/submodules/orml
url = https://github.com/Slixon-Technologies/open-runtime-module-library
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ members = [
"modules/vesting",

# ORML modules
"highway/orml/authority",
"highway/orml/benchmarking",
"highway/orml/currencies",
"highway/orml/nft",
"highway/orml/oracle",
"highway/orml/oracle/rpc",
"highway/orml/oracle/rpc/runtime-api",
"highway/orml/tokens",
"highway/orml/traits",
"highway/orml/utilities",
"submodules/orml/authority",
"submodules/orml/benchmarking",
"submodules/orml/currencies",
"submodules/orml/nft",
"submodules/orml/oracle",
"submodules/orml/oracle/rpc",
"submodules/orml/oracle/rpc/runtime-api",
"submodules/orml/tokens",
"submodules/orml/traits",
"submodules/orml/utilities",
]
exclude = ['rpc']

Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ wasm:
.PHONY: genesis
genesis:
make build
./target/release/setheum-node build-spec --chain testnet-new > resources/chain_spec_testnet.json
./target/release/setheum-node build-spec --chain mainnet-new > resources/chain_spec_mainnet.json
./target/release/setheum-node build-spec --chain testnet-new --raw > resources/chain_spec_testnet_raw.json
./target/release/setheum-node build-spec --chain mainnet-new --raw > resources/chain_spec_mainnet_raw.json
./target/release/setheum-node build-spec --chain testnet-new > blockchain/bin/resources/chain_spec_testnet.json
./target/release/setheum-node build-spec --chain mainnet-new > blockchain/bin/resources/chain_spec_mainnet.json
./target/release/setheum-node build-spec --chain testnet-new --raw > blockchain/bin/resources/chain_spec_testnet_raw.json
./target/release/setheum-node build-spec --chain mainnet-new --raw > blockchain/bin/resources/chain_spec_mainnet_raw.json

.PHONY: check
check:
Expand Down Expand Up @@ -118,11 +118,11 @@ ifeq (,$(wildcard fork/data))
endif
cp target/release/setheum-node fork/data/binary
cp target/release/wbuild/setheum-runtime/setheum_runtime.compact.wasm fork/data/runtime.wasm
cp resources/types.json fork/data/schema.json
cp resources/chain_spec_$(chain)_raw.json fork/data/genesis.json
cp blockchain/bin/resources/types.json fork/data/schema.json
cp blockchain/bin/resources/chain_spec_$(chain)_raw.json fork/data/genesis.json
cd fork && npm start && cd ..

.PHONY: generate-tokens
generate-tokens:
cargo test -p setheum-primitives -- --ignored
cd highway/predeploy-contracts && yarn && yarn run generate-bytecode
cd blockchain/submodules/predeploy-contracts && yarn && yarn run generate-bytecode
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ Setheum's Blockchain Network node Implementation in Rust, ready for hacking :roc

<div align="center">

[![Setheum version](https://img.shields.io/badge/Setheum-1.0.0-blue?logo=Parity%20Substrate)](https://setheum.xyz/)
[![Substrate version](https://img.shields.io/badge/Substrate-4.0.0-brightgreen?logo=Parity%20Substrate)](https://substrate.dev/)
[![Setheum version](https://img.shields.io/badge/Setheum-0.9.80-blue?logo=Parity%20Substrate)](https://setheum.xyz/)
[![License](https://img.shields.io/github/license/Setheum-Labs/Setheum?color=blue)](https://github.com/Setheum-Labs/Setheum/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/contributor/CONTRIBUTING.md)

Expand Down Expand Up @@ -228,7 +227,7 @@ cargo update check-all
Update Predeploy-Contracts:

```bash
cd highway/predeploy-contracts && git checkout master && git pull
cd blockchain/submodules/predeploy-contracts && git checkout master && git pull
git add predeploy-contracts
cargo update check-all
```
Expand Down
12 changes: 6 additions & 6 deletions node/Cargo.toml → blockchain/chains/qingdao/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch =

node-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }

orml-oracle-rpc = { path = "../highway/orml/oracle/rpc" }
orml-oracle-rpc = { path = "../../submodules/orml/oracle/rpc" }

module-nft = { path = "../modules/nft" }
module-evm = { path = "../modules//evm" }
module-evm-rpc-runtime-api = { path = "../modules//evm/rpc/runtime_api" }
evm-rpc = { path = "../modules//evm/rpc" }
module-nft = { path = "../../../modules/nft" }
module-evm = { path = "../../../modules//evm" }
module-evm-rpc-runtime-api = { path = "../../../modules//evm/rpc/runtime_api" }
evm-rpc = { path = "../../../modules//evm/rpc" }

setheum-primitives = { path = "../primitives" }
setheum-primitives = { path = "../../primitives" }

# runtime
setheum-runtime = { path = '../runtime', version = '1.0.0' }
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ pub fn setheum_properties() -> Properties {
pub fn evm_genesis() -> BTreeMap<H160, module_evm::GenesisAccount<Balance, Nonce>> {
let existential_deposit = MaxNativeTokenExistentialDeposit::get();

let contracts_json = &include_bytes!("../../lib-sesl/predeploy-contracts/resources/bytecodes.json")[..];
let contracts_json = &include_bytes!("../../submodules/predeploy-contracts/resources/bytecodes.json")[..];
let contracts: Vec<(String, String, String)> = serde_json::from_slice(contracts_json).unwrap();
let mut accounts = BTreeMap::new();
for (_, address, code_string) in contracts {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rpc/rpc.py → blockchain/chains/qingdao/rpc/rpc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from substrateinterface import SubstrateInterface

import json
types = json.load(open("../resources/types.json", "r"))
types = json.load(open("../../resources/types.json", "r"))

url = "http://127.0.0.1:9933"
# url = "https://rpc-newrome.setheum.xyz"
Expand Down
48 changes: 24 additions & 24 deletions runtime/Cargo.toml → blockchain/chains/qingdao/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,30 +81,30 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", default-fea

# local dependencies

orml-authority = { path = "../highway/orml/authority", default-features = false }
orml-benchmarking = { path = "../highway/orml/benchmarking", default-features = false, optional = true }
orml-oracle = { path = "../highway/orml/oracle", default-features = false }
orml-oracle-rpc-runtime-api = { path = "../highway/orml/oracle/rpc/runtime-api", default-features = false }
orml-tokens = { path = "../highway/orml/tokens", default-features = false }
orml-traits = { path = "../highway/orml/traits", default-features = false }
orml-nft= { path = "../highway/orml/nft", default-features = false }

module-transaction-pause = { path = "../modules/transaction-pause", default-features = false }
module-transaction-payment = { path = "../modules/transaction-payment", default-features = false }
module-airdrop = { path = "../modules/airdrop", default-features = false }

module-currencies = { path = "../modules/currencies", default-features = false }
module-evm = { path = "../modules//evm", default-features = false }
module-evm-accounts = { path = "../modules//evm-accounts", default-features = false }
module-evm-bridge = { path = "../modules//evm-bridge", default-features = false }
module-evm-rpc-runtime-api = { path = "../modules//evm/rpc/runtime_api", default-features = false }
module-evm-manager = { path = "../modules//evm-manager", default-features = false }

module-nft = { path = "../modules/nft", default-features = false }
module-prices = { path = "../modules/prices", default-features = false }

module-support = { path = "../modules/support", default-features = false }
module-vesting = { path = "../modules/vesting", default-features = false }
orml-authority = { path = "../../submodules/orml/authority", default-features = false }
orml-benchmarking = { path = "../../submodules/orml/benchmarking", default-features = false, optional = true }
orml-oracle = { path = "../../submodules/orml/oracle", default-features = false }
orml-oracle-rpc-runtime-api = { path = "../../submodules/orml/oracle/rpc/runtime-api", default-features = false }
orml-tokens = { path = "../../submodules/orml/tokens", default-features = false }
orml-traits = { path = "../../submodules/orml/traits", default-features = false }
orml-nft= { path = "../../submodules/orml/nft", default-features = false }

module-transaction-pause = { path = "../../../modules/transaction-pause", default-features = false }
module-transaction-payment = { path = "../../../modules/transaction-payment", default-features = false }
module-airdrop = { path = "../../../modules/airdrop", default-features = false }

module-currencies = { path = "../../../modules/currencies", default-features = false }
module-evm = { path = "../../../modules/evm", default-features = false }
module-evm-accounts = { path = "../../../modules/evm-accounts", default-features = false }
module-evm-bridge = { path = "../../../modules/evm-bridge", default-features = false }
module-evm-rpc-runtime-api = { path = "../../../modules/evm/rpc/runtime_api", default-features = false }
module-evm-manager = { path = "../../../modules/evm-manager", default-features = false }

module-nft = { path = "../../../modules/nft", default-features = false }
module-prices = { path = "../../../modules/prices", default-features = false }

module-support = { path = "../../../modules/support", default-features = false }
module-vesting = { path = "../../../modules/vesting", default-features = false }

primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }
runtime-common = { path = "common", default-features = false }
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ log = { version = "0.4.14", default-features = false }
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }

orml-oracle = { path = "../../highway/orml/oracle", default-features = false }
orml-traits = { path = "../../highway/orml/traits", default-features = false }
orml-oracle = { path = "../submodules/orml/oracle", default-features = false }
orml-traits = { path = "../submodules/orml/traits", default-features = false }

module-evm = { path = "../../modules//evm", default-features = false }
module-support = { path = "../../modules/support", default-features = false }
module-transaction-payment = { path = "../../modules/transaction-payment", default-features = false }
primitives = { package = "setheum-primitives", path = "../../primitives", default-features = false }
primitives-proc-macro = { path = "../../primitives/proc-macro" }
module-evm = { path = "../../../modules//evm", default-features = false }
module-support = { path = "../../../modules/support", default-features = false }
module-transaction-payment = { path = "../../../modules/transaction-payment", default-features = false }
primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }
primitives-proc-macro = { path = "../primitives/proc-macro" }

[dev-dependencies]
serde_json = "1.0.41"
Expand All @@ -38,16 +38,16 @@ pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "p
pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }

orml-tokens = { path = "../../highway/orml/tokens" }
orml-nft = { path = "../../highway/orml/nft" }
orml-tokens = { path = "../submodules/orml/tokens" }
orml-nft = { path = "../submodules/orml/nft" }

module-currencies = { path = "../../modules/currencies" }
module-evm-bridge = { path = "../../modules//evm-bridge" }
module-evm-manager = { path = "../../modules//evm-manager" }
module-nft = { path = "../../modules/nft" }
# module-dex = { path = "../../modules/defi/setswap/dex" }
module-prices = { path = "../../modules/prices" }
module-transaction-payment = { path = "../../modules/transaction-payment" }
module-currencies = { path = "../../../modules/currencies" }
module-evm-bridge = { path = "../../../modules//evm-bridge" }
module-evm-manager = { path = "../../../modules//evm-manager" }
module-nft = { path = "../../../modules/nft" }
# module-dex = { path = "../../../modules/defi/setswap/dex" }
module-prices = { path = "../../../modules/prices" }
module-transaction-payment = { path = "../../../modules/transaction-payment" }

[features]
default = ["std"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ pub fn erc20_address_not_exists() -> EvmAddress {

/// Predeployed contract addresses
pub fn evm_genesis() -> BTreeMap<H160, module_evm::GenesisAccount<Balance, Nonce>> {
let contracts_json = &include_bytes!("../../../../highway/predeploy-contracts/resources/bytecodes.json")[..];
let contracts_json = &include_bytes!("../../../submodules/predeploy-contracts/resources/bytecodes.json")[..];
let contracts: Vec<(String, String, String)> = serde_json::from_slice(contracts_json).unwrap();
let mut accounts = BTreeMap::new();
for (_, address, code_string) in contracts {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ frame-system = { git = "https://github.com/paritytech/substrate", branch = "polk
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }

orml-traits = { package = "orml-traits", path = "../../highway/orml/traits", default-features = false }
orml-traits = { package = "orml-traits", path = "../submodules/orml/traits", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
primitives = { package = "setheum-primitives", path = "../../primitives", default-features = false }
primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
orml-tokens = { path = "../../highway/orml/tokens" }
orml-tokens = { path = "../submodules/orml/tokens" }

[features]
default = ["std"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }

orml-traits = { path = "../../highway/orml/traits", default-features = false }
orml-utilities = { path = "../../highway/orml/utilities", default-features = false }
orml-traits = { path = "../submodules/orml/traits", default-features = false }
orml-utilities = { path = "../submodules/orml/utilities", default-features = false }

primitives = { package = "setheum-primitives", path = "../../primitives", default-features = false }
primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
tokens = { package = "orml-tokens", path = "../../highway/orml/tokens" }
tokens = { package = "orml-tokens", path = "../submodules/orml/tokens" }
module-evm = { path = "../evm" }
module-evm-bridge = { path = "../evm-bridge" }

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// --wasm-execution=compiled
// --heap-pages=4096
// --template=.maintain/module-weight-template.hbs
// --output=./modules/currencies/src/weights.rs
// --output=./blockchain/modules/currencies/src/weights.rs


#![cfg_attr(rustfmt, rustfmt_skip)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }

orml-traits = { path = "../../highway/orml/traits", default-features = false }
orml-traits = { path = "../submodules/orml/traits", default-features = false }

primitives = { package = "setheum-primitives", path = "../../primitives", default-features = false }
primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }
module-support = { path = "../support", default-features = false }

[dev-dependencies]
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
orml-currencies = { path = "../../highway/orml/currencies" }
orml-tokens = { path = "../../highway/orml/tokens" }
orml-currencies = { path = "../submodules/orml/currencies" }
orml-tokens = { path = "../submodules/orml/tokens" }

[features]
default = ["std"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./modules/evm-accounts/src/weights.rs
// --output=./blockchain/modules/evm-accounts/src/weights.rs
// --template=.maintain/module-weight-template.hbs


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ primitive-types = { version = "0.10.0", default-features = false, features = ["r
impl-trait-for-tuples = "0.2.1"
ethereum-types = { version = "0.12.0", default-features = false }

primitives = { package = "setheum-primitives", path = "../../primitives", default-features = false }
primitives-proc-macro = { path = "../../primitives/proc-macro" }
primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }
primitives-proc-macro = { path = "../primitives/proc-macro" }
support = { package = "module-support", path = "../support", default-features = false }
module-evm = { path = "../evm", default-features = false }
num_enum = { version = "0.5.1", default-features = false }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }

primitives = { package = "setheum-primitives", path = "../../primitives", default-features = false }
primitives = { package = "setheum-primitives", path = "../primitives", default-features = false }
module-support = { path = "../support", default-features = false }

[dev-dependencies]
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
orml-currencies = { path = "../../highway/orml/currencies" }
orml-tokens = { path = "../../highway/orml/tokens" }
orml-traits = { path = "../../highway/orml/traits" }
orml-utilities = { path = "../../highway/orml/utilities" }
orml-currencies = { path = "../submodules/orml/currencies" }
orml-tokens = { path = "../submodules/orml/tokens" }
orml-traits = { path = "../submodules/orml/traits" }
orml-utilities = { path = "../submodules/orml/utilities" }
module-evm = { path = "../evm" }
module-evm-bridge = { path = "../evm-bridge" }

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ba4421d

Please sign in to comment.