Run an Ethereum compatible parachain based on Substrate.
See www.substrate.io for substrate information.
See psm.link for the prism chain description.
Follow these steps to prepare a local Substrate development environment 🛠️
Get the master branch of prism:
git clone https://github.com/ShadowsNetwork/prism
cd prism
Install all the required dependencies with a single command (be patient, this can take up to 30 minutes).
curl https://getsubstrate.io -sSf | bash -s -- --fast
source $HOME/.cargo/env
Run the initialization script, which checks the correct rust nightly version and adds the wasm32-unknown-unknown
target to that specific version:
./scripts/init.sh
Once the development environment is set up, build the prism-node. This command will build the Wasm and native code:
cargo build --release --features "aura"
Purge any existing dev chain state:
./target/release/prism-node purge-chain --dev
Start a dev chain:
./target/release/prism-node --dev --ws-external --rpc-external --rpc-cors=all
Or, start a dev chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/prism-node -lruntime=debug --dev
Local TestNet: 127.0.0.1:9933 ,
ChainId: 888 ,
Account:
- Address: 0xAA7358886fd6FEc1d64323D9da340FD3c0B9a9E4
- PriKey: 0x665c5c10437cc1220b805b3b6d015c82f476e1d8144f08ba85840eddf4b903a5
- contractAddress: 0x22b7265E52943D5A2F610bCf075F6AC307BcC706
if you want to deployment contract on the testnet,this will help you.
Start a test chain with "manual-seal":
cargo build --release --features "manual-seal"
if you want to test, it is a good idea to use https://hardhat.org/tutorial/
After setting up the hardhat test environment
npx hardhat test