Advanced technical topics and development patterns for Phala Network.
no_std
crates. This also limits the resources a contract can use (e.g. listening to a port for connections).std
library, and listen to the port.
start_sidevm()
function. Contact us is the #dev
channel in our Discord server to get support.
Also, you can run your local testnet following our tutorial and then do the testing.
sideprog
folder.
The SideVM part listens to a local port. It will be launched by this line of code if called.
make
under the folder and it will give you
sideprog.wasm
target/ink/start_sidevm.contract
Phala (PoC 6)
under TEST NETWORKS
.
Developer
- Extrinsics
, choose phalaFatContracts
and clusterUploadResource
. Change resourceType
to SidevmCode
, and drag your sideprog.wasm
here.
Submit the transaction and you shall see its success.
Interact with Phat UI
Go to https://phat.phala.network/, click sign in
and link your address. You need to ensure the RPC Endpoint
is wss://poc6.phala.network/ws
and Default PRuntime Endpoint
is https://phat-cluster-us.phala.network/poc6/pruntime/0xac5087e0.
Upload
and drag your target/ink/start_sidevm.contract
. Choose the default constructor and Cluster 0x0000000000000000000000000000000000000000000000000000000000000000
. Click Submit
. You should see something like
start_sidevm
query is used to start the SideVM program. It contains the invoke to pink::start_sidevm()
.
From the Worker log, we can see