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

error[E0609]: no field poll on type poll_app::CreateBumps #1

Open
hnlisf opened this issue Jun 13, 2024 · 2 comments
Open

error[E0609]: no field poll on type poll_app::CreateBumps #1

hnlisf opened this issue Jun 13, 2024 · 2 comments

Comments

@hnlisf
Copy link

hnlisf commented Jun 13, 2024

When I studied your second Seahorse Solana program, copied your code, and executed the build instruction, the following error occurred like this:

Building...
warning: unused macro definition: `Loaded`
 --> src/lib.rs:6:3876
  |
6 | ... ; fn store (loaded : Self :: Loaded) -> Self ; } macro_rules ! Loaded { ($ name : ty) => { < $ name as Loadable > :: Loaded } } pub (...
  |                                                                    ^^^^^^
  |
  = note: `#[warn(unused_macros)]` on by default
 
error[E0609]: no field `poll` on type `poll_app::CreateBumps`
 --> src/lib.rs:6:5286
  |
6 | ...nts . poll , & programs_map) , bump : Some (ctx . bumps . poll) } ; create_handler (user . clone () , poll . clone ()) ; dot :: progra...
  |                                                              ^^^^ unknown field
 
warning: `poll_app` (lib) generated 1 warning
error: could not compile `poll_app` due to previous error; 1 warning emitted

I tried to find a solution on the Internet, but couldn't find one. I hope you can give me some advice. Thank you.

@hnlisf
Copy link
Author

hnlisf commented Jun 14, 2024

I've fixed this issue and modified the code as follows:


@instruction
def create(user: Signer, poll: Empty[Poll]):
    poll = poll.init(payer=user,seeds=['Poll',user])

@lostintime101
Copy link
Owner

thanks hnlisf,
yes this seems to be coming up as an issue now,
previously it was fine to initialize without seeds,
feel free to put in a PR to change the program

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

2 participants