Skip to content

A substrate-based chain integrated with SM2/ Substrate兼容国密

License

Notifications You must be signed in to change notification settings

sekisamu/substrate-sm2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Substrate SM2

substrate-sm2 is a simple SM2 integration for Substrate. With this, you can sign message with SM2 algorithm and submit it into substrate for verifying.

DO NOT use it as-is in real applications.

Build

Install Rust:

curl https://sh.rustup.rs -sSf | sh

Build Wasm and native code:

cargo build --release

Run

Single node development chain

Purge any existing developer chain state:

./target/release/node-template purge-chain --dev

Start a development chain with:

./target/release/node-template --dev

Detailed logs may be shown by running the node with the following environment variables set: RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev.

Test

Go to utils, run:

cargo run --release

for testing. For this showcase, you will see:

    Finished release [optimized] target(s) in 8.95s
     Running `/Users/hammer/Documents/paritytech/code/hammeWang/substrate-sm2/target/release/utils`
Balance transfer success: value: 10000

Thanks

Many thanks to CITA

About

A substrate-based chain integrated with SM2/ Substrate兼容国密

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published