Reference documentation and resources for Phala Network development.
config(&mut self, argument0, ...)
function and set the contract state with transactions after the instantiationcargo-contract
may be invalid. We’ve listed common errors and solutions below:
--keep-debug-symbols
, then convert the wasm file to wat using wasm2wat my_contract.wasm > my_contract.wat
, and search for f32
or f64
in my_contract.wat to find the function using these instructions.serde_json
.json::Value
or serde::Value
. These are dynamically typed values and make it impossible for the compiler to optimize the code paths that contain FP ops. Instead, mark concrete types with #[derive(Deserialize)]
and deserialize to them directly.pink-web3
and loading Contract
from its JSON ABI, you may encounter FP problems in a function like _ZN5serde9__private2de7content7Content10unexpected17h5ce9c505c30bc609E
from serde. To fix this, you can patch serde
as shown below.Note: At the time of writing this, everything below except the Demand L1 tokenomic is up and running