ChorusOne/solido

Why are the structs different in the rust program vs js package?

deloused opened this issue · 4 comments

Eg:

JS

  [
    RewardDistribution,
    {
      kind: 'struct',
      fields: [
        ['treasury_fee', 'u32'],
        ['validation_fee', 'u32'],
        ['developer_fee', 'u32'],
        ['st_sol_appreciation', 'u32'],
      ],
    },
  ],

rust

pub struct RewardDistribution {
    pub treasury_fee: u32,
    pub developer_fee: u32,
    pub st_sol_appreciation: u32,
}

Because we have not upgraded JS lib yet. We are in the process of translation to Solido version 2.

ok cheers. is the rust version the solido version 2?

ruuda commented

@deloused you want to look at the Rust code for the currently deployed version, not at the main branch: https://github.com/ChorusOne/solido/blob/v1.0.0/program/src/state.rs#L188