Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(gmeta): gmeta crate removed completely #4347

Open
wants to merge 3 commits into
base: laz/remove-usage-of-read-state-with-wasm
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 4 additions & 92 deletions Cargo.lock

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

7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ members = [
"examples/messenger",
"examples/mul-by-const",
"examples/ncompose",
"examples/new-meta",
"examples/node",
"examples/out-of-memory",
"examples/piggy-bank",
Expand Down Expand Up @@ -88,8 +87,6 @@ members = [
"gcli",
"gclient",
"gcore",
"gmeta",
"gmeta/codegen",
"gprimitives",
"gsdk",
"gsdk/codegen",
Expand Down Expand Up @@ -229,8 +226,6 @@ gstd-codegen = { path = "gstd/codegen" }
gring = { path = "utils/gring" }
gsys = { path = "gsys" }
gtest = { path = "gtest" }
gmeta = { path = "gmeta" }
gmeta-codegen = { path = "gmeta/codegen" }
gprimitives = { path = "gprimitives", default-features = false }
gear-authorship = { path = "node/authorship" }
gear-core-backend = { path = "core-backend", default-features = false }
Expand Down Expand Up @@ -467,9 +462,7 @@ demo-init-fail-sender = { path = "examples/init-fail-sender" }
demo-init-wait = { path = "examples/init-wait", default-features = false }
demo-init-wait-reply-exit = { path = "examples/init-wait-reply-exit" }
demo-messenger = { path = "examples/messenger" }
demo-meta-io = { path = "examples/new-meta/io" }
demo-mul-by-const = { path = "examples/mul-by-const" }
demo-new-meta = { path = "examples/new-meta" }
demo-node = { path = "examples/node" }
demo-out-of-memory = { path = "examples/out-of-memory" }
demo-piggy-bank = { path = "examples/piggy-bank", features = ["debug"] }
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ doc:
@ RUSTDOCFLAGS="--enable-index-page --generate-link-to-definition -Zunstable-options -D warnings" cargo doc --no-deps \
-p galloc -p gclient -p gcore -p gear-core-backend \
-p gear-core -p gear-core-processor -p gear-lazy-pages -p gear-core-errors \
-p gmeta -p gtest -p gear-wasm-builder -p gear-common \
-p pallet-gear -p pallet-gear-gas -p pallet-gear-messenger -p pallet-gear-payment \
-p pallet-gear-program -p pallet-gear-rpc-runtime-api -p pallet-gear-rpc -p pallet-gear-scheduler -p gsdk
@ RUSTDOCFLAGS="--enable-index-page --generate-link-to-definition -Zunstable-options -D warnings" cargo doc --no-deps \
Expand Down
1 change: 0 additions & 1 deletion examples/fungible-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ repository.workspace = true
[dependencies]
gstd.workspace = true
hashbrown.workspace = true
gmeta.workspace = true
ft-io = { path = "io" }

[dev-dependencies]
Expand Down
1 change: 0 additions & 1 deletion examples/fungible-token/io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ repository.workspace = true

[dependencies]
gstd.workspace = true
gmeta.workspace = true
36 changes: 24 additions & 12 deletions examples/fungible-token/io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,8 @@
#![no_std]

use core::ops::Range;
use gmeta::{In, InOut, Metadata, Out};
use gstd::{prelude::*, ActorId};

pub struct FungibleTokenMetadata;

impl Metadata for FungibleTokenMetadata {
type Init = In<InitConfig>;
type Handle = InOut<FTAction, FTEvent>;
type Others = ();
type Reply = ();
type Signal = ();
type State = Out<IoFungibleToken>;
}

#[derive(Debug, Decode, Encode, TypeInfo)]
#[codec(crate = gstd::codec)]
#[scale_info(crate = gstd::scale_info)]
Expand Down Expand Up @@ -92,3 +80,27 @@ pub struct IoFungibleToken {
pub allowances: Vec<(ActorId, Vec<(ActorId, u128)>)>,
pub decimals: u8,
}

impl InitConfig {
pub fn test_sequence() -> Self {
InitConfig {
name: "MyToken".to_string(),
symbol: "MTK".to_string(),
decimals: 18,
initial_capacity: None,
}
}
}

impl IoFungibleToken {
pub fn test_sequence() -> Self {
IoFungibleToken {
name: "MyToken".to_string(),
symbol: "MTK".to_string(),
total_supply: 0,
balances: vec![],
allowances: vec![],
decimals: 18,
}
}
}
2 changes: 2 additions & 0 deletions examples/fungible-token/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#![cfg_attr(not(feature = "std"), no_std)]

pub use ft_io::*;

#[cfg(feature = "std")]
mod code {
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
Expand Down
33 changes: 0 additions & 33 deletions examples/new-meta/Cargo.toml

This file was deleted.

23 changes: 0 additions & 23 deletions examples/new-meta/build.rs

This file was deleted.

14 changes: 0 additions & 14 deletions examples/new-meta/io/Cargo.toml

This file was deleted.

Loading