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

Compilation errors #77

Open
jo-es opened this issue Dec 19, 2024 · 1 comment
Open

Compilation errors #77

jo-es opened this issue Dec 19, 2024 · 1 comment

Comments

@jo-es
Copy link

jo-es commented Dec 19, 2024

I'm getting the following compilation errors after generating bindings with Cainome.
Cainome: v0.4.2

error[E0277]: the trait bound `<A as ConnectedAccount>::Provider: starknet_providers::provider::Provider` is not satisfied
    --> src/bindings/x.rs:1373:56
     |
1373 |         cainome::cairo_serde::call::FCall::new(__call, self.provider())
     |         --------------------------------------         ^^^^^^^^^^^^^^^ the trait `starknet_providers::provider::Provider` is not implemented for `<A as ConnectedAccount>::Provider`
     |         |
     |         required by a bound introduced by this call
     |
note: required by a bound in `FCall::<'p, P, T>::new`
    --> /Users/johannes/.cargo/git/checkouts/cainome-971a2d0b3a80c185/4e3924f/crates/cairo-serde/src/call.rs:17:8
     |
17   |     P: starknet::providers::Provider + Sync,
     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `FCall::<'p, P, T>::new`
...
20   |     pub fn new(call_raw: FunctionCall, provider: &'p P) -> Self {
     |            --- required by a bound in this associated function
help: consider further restricting the associated type
     |
1365 |     ) -> cainome::cairo_serde::call::FCall<A::Provider, bool> where <A as ConnectedAccount>::Provider: starknet_providers::provider::Provider {
     |                                                               +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0308]: mismatched types
    --> src/bindings/x.rs:1373:48
     |
1373 |         cainome::cairo_serde::call::FCall::new(__call, self.provider())
     |         -------------------------------------- ^^^^^^ expected `starknet_core::types::codegen::FunctionCall`, found `FunctionCall`
     |         |
     |         arguments to this function are incorrect
     |
     = note: `FunctionCall` and `starknet_core::types::codegen::FunctionCall` have similar names, but are actually distinct types
@glihm
Copy link
Collaborator

glihm commented Dec 23, 2024

I'm getting the following compilation errors after generating bindings with Cainome.

Cainome: v0.4.2


error[E0277]: the trait bound `<A as ConnectedAccount>::Provider: starknet_providers::provider::Provider` is not satisfied

    --> src/bindings/x.rs:1373:56

     |

1373 |         cainome::cairo_serde::call::FCall::new(__call, self.provider())

     |         --------------------------------------         ^^^^^^^^^^^^^^^ the trait `starknet_providers::provider::Provider` is not implemented for `<A as ConnectedAccount>::Provider`

     |         |

     |         required by a bound introduced by this call

     |

note: required by a bound in `FCall::<'p, P, T>::new`

    --> /Users/johannes/.cargo/git/checkouts/cainome-971a2d0b3a80c185/4e3924f/crates/cairo-serde/src/call.rs:17:8

     |

17   |     P: starknet::providers::Provider + Sync,

     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `FCall::<'p, P, T>::new`

...

20   |     pub fn new(call_raw: FunctionCall, provider: &'p P) -> Self {

     |            --- required by a bound in this associated function

help: consider further restricting the associated type

     |

1365 |     ) -> cainome::cairo_serde::call::FCall<A::Provider, bool> where <A as ConnectedAccount>::Provider: starknet_providers::provider::Provider {

     |                                                               +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



error[E0308]: mismatched types

    --> src/bindings/x.rs:1373:48

     |

1373 |         cainome::cairo_serde::call::FCall::new(__call, self.provider())

     |         -------------------------------------- ^^^^^^ expected `starknet_core::types::codegen::FunctionCall`, found `FunctionCall`

     |         |

     |         arguments to this function are incorrect

     |

     = note: `FunctionCall` and `starknet_core::types::codegen::FunctionCall` have similar names, but are actually distinct types

Thank you for the issue @jo-es! Would you have the ABI used to generate this error? Could be helpful to reproduce.

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