NethermindEth / starknet-contract-verifier

CLI to verify your starknet contracts classes on block explorers!
Apache License 2.0
19 stars 10 forks source link

Fails to compile dependencies in a Scarb directory #24

Open amanusk opened 6 months ago

amanusk commented 6 months ago

Working with oz cairo-contract in this example

tag release-v0.8.1

scarb 2.4.1 is set in .tools and the relevant tag is selected for starknet-contract-verifier

Specifying the desired contract in the toml:

[tool.voyager]
account = { path = "account/account.cairo" }

Running the tool

✔ Which network would you like to verify on :  · Sepolia
✔ Input class hash to verify :  · 0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f
✔ Enter Class Contract Path : · .
✔ Select license you'd like to verify under : · MIT
✔ Enter your desired class name:  · oz_account
Is this an Account Class? yes

Results:

   Compiling starknet-contract(openzeppelin) openzeppelin v0.8.1 (/home/amanusk/Code/Cairo1/cairo-contracts/Scarb.toml)
thread 'main' panicked at crates/voyager-resolver-cairo/src/utils/mod.rs:196:9:
   Compiling lib(openzeppelin) openzeppelin v0.8.1 (/home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/Scarb.toml)
error: Identifier not found.
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:11:23
    use openzeppelin::introspection::src5::SRC5Component::InternalTrait as SRC5InternalTrait;
                      ^***********^

error: Identifier not found.
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:12:23
    use openzeppelin::introspection::src5::SRC5Component;
                      ^***********^

error: Method `validate_transaction` not found on type "@openzeppelin::account::account::AccountComponent::ComponentState::<TContractState>". Did you import the correct trait and impl?
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:90:18
            self.validate_transaction()
                 ^******************^

error: Method `_is_valid_signature` not found on type "@openzeppelin::account::account::AccountComponent::ComponentState::<TContractState>". Did you import the correct trait and impl?
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:97:21
            if self._is_valid_signature(hash, signature.span()) {
                    ^*****************^

error: Method `validate_transaction` not found on type "@openzeppelin::account::account::AccountComponent::ComponentState::<TContractState>". Did you import the correct trait and impl?
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:117:18
            self.validate_transaction()
                 ^******************^

error: Method `validate_transaction` not found on type "@openzeppelin::account::account::AccountComponent::ComponentState::<TContractState>". Did you import the correct trait and impl?
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:136:18
            self.validate_transaction()
                 ^******************^

error: Method `assert_only_self` not found on type "openzeppelin::account::account::AccountComponent::ComponentState::<TContractState>". Did you import the correct trait and impl?
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:160:18
            self.assert_only_self();
                 ^**************^

error: Method `_set_public_key` not found on type "openzeppelin::account::account::AccountComponent::ComponentState::<TContractState>". Did you import the correct trait and impl?
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:162:18
            self._set_public_key(new_public_key);
                 ^*************^

error: Method `is_valid_signature` not found on type "@openzeppelin::account::account::AccountComponent::ComponentState::<TContractState>". Did you import the correct trait and impl?
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:177:18
            self.is_valid_signature(hash, signature)
                 ^****************^

error: Method `set_public_key` not found on type "openzeppelin::account::account::AccountComponent::ComponentState::<TContractState>". Did you import the correct trait and impl?
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:194:18
            self.set_public_key(newPublicKey);
                 ^************^

error: Not a trait.
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:204:10
    > of InternalTrait<TContractState> {
         ^***************************^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:51:10
    impl SRC6<
         ^**^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:51:10
    impl SRC6<
         ^**^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:51:10
    impl SRC6<
         ^**^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:106:10
    impl Declarer<
         ^******^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:122:10
    impl Deployable<
         ^********^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:141:10
    impl PublicKey<
         ^*******^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:141:10
    impl PublicKey<
         ^*******^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:168:10
    impl SRC6CamelOnly<
         ^***********^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:183:10
    impl PublicKeyCamel<
         ^************^

error: Plugin diagnostic: Type annotations needed. Failed to infer ?1
 --> /home/amanusk/Code/Cairo1/cairo-contracts/voyager-verify/openzeppelin/src/account/account.cairo:183:10
    impl PublicKeyCamel<
         ^************^

error: could not compile `openzeppelin` due to previous error

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace