Skip to content

Commit

Permalink
feat: add package structure (#5)
Browse files Browse the repository at this point in the history
* feat: update to package structure

* rename dependencies to definitions
  • Loading branch information
vlopes11 authored Nov 16, 2023
1 parent 651f535 commit 518a3f4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion external/sov-wasm/Cargo.lock

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

1 change: 0 additions & 1 deletion external/sov-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
borsh = "0.10.3"
serde = "1.0"
serde_json = "1.0"
demo-stf = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "df169be", features = ["serde"] }
sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "df169be", features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion external/sov-wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ wasm: ## Build the WASM files
$(PACKAGE_RESTORED_OPTIMIZED)
@mv $(PACKAGE_THIN) $(PACKAGE_SHORT)
@rm $(PACKAGE)
@echo "Package created: $(PACKAGE)"
@echo "Package created: $(PACKAGE_SHORT)"

help: ## Display this help screen
@grep -h \
Expand Down
Binary file modified external/sov-wasm/assets/sov-wasm.wasm
Binary file not shown.
3 changes: 3 additions & 0 deletions external/sov-wasm/src/definitions.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub type Context = sov_modules_api::default_context::ZkDefaultContext;
pub type DaSpec = sov_mock_da::MockDaSpec;
pub type RuntimeCall = demo_stf::runtime::RuntimeCall<Context, DaSpec>;
15 changes: 7 additions & 8 deletions external/sov-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ use alloc::vec::Vec;
use core::{mem, slice};

use borsh::{BorshDeserialize, BorshSerialize};
use sov_mock_da::MockDaSpec;
use sov_modules_api::default_context::ZkDefaultContext;
use sov_modules_api::{Signature as _, Spec};

pub type Context = ZkDefaultContext;
pub type RuntimeCall = demo_stf::runtime::RuntimeCall<Context, MockDaSpec>;
pub type PublicKey = <Context as Spec>::PublicKey;
pub type Signature = <Context as Spec>::Signature;
use sov_modules_api::Signature as _;

mod definitions;
use definitions::{Context, RuntimeCall};

pub type PublicKey = <Context as sov_modules_api::Spec>::PublicKey;
pub type Signature = <Context as sov_modules_api::Spec>::Signature;
pub type Transaction = sov_modules_api::transaction::Transaction<Context>;

#[cfg(test)]
Expand Down

0 comments on commit 518a3f4

Please sign in to comment.