Error due to floating point operation in module code

Hey guys. I am trying to instantiate a contract in rust and gave the following arguments for the instantiation command

However the command results in this error:

   "output_logs": [],
    "plaintext_error": "failed to execute message; message index: 0: Execution error: Enclave: found floating point operation in module code: instantiate contract failed"

This is how my InitMsg looks like

/// Instantiation message
#[derive(Serialize, Deserialize, JsonSchema)]
pub struct InitMsg {
    /// name of token contract
    pub name: String,
    /// optional admin address, env.message.sender if missing
    pub admin: Option<HumanAddr>,
    /// optional privacy configuration for the contract
    pub config: Option<InitConfig>,
    /// entropy used for prng seed
    pub entropy: String,

Can we get more information? Which crate(s) are you using? What are HumanAddr and InitConfig?

That said, IIRC with serde if you want an Option to be None when the field isn't present you need to mark it with #[serde(default)], e.g. This was wrong; I tested it in the Playground and you don't need it.

There is not enough information in your post to help you. You appear to be interfacing into some kind of cryptocurrency system, but have specified neither which one nor what libraries you are using to do so.

Also, most people here aren’t working with any kind of cryptocurrency, so you might have trouble finding substantive help here— You might want to ask this instead in a forum dedicated to the system you’re interacting with instead of a general forum for the programming language.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.