Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
deloused opened this issue Jul 17, 2022 · 4 comments
Open

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

deloused opened this issue Jul 17, 2022 · 4 comments

Comments

@deloused
Copy link

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,
}
@kkonevets
Copy link
Collaborator

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

@deloused
Copy link
Author

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

@kkonevets
Copy link
Collaborator

kkonevets commented Jul 18, 2022 via email

@ruuda
Copy link
Contributor

ruuda commented Jul 18, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants