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

Migrate to starknet foundry #83

Open
LucasLvy opened this issue Jun 11, 2024 · 13 comments
Open

Migrate to starknet foundry #83

LucasLvy opened this issue Jun 11, 2024 · 13 comments
Assignees

Comments

@LucasLvy
Copy link
Contributor

Currently the cairo part uses the base testing framework. We need to migrate to use starknet foundry.
doc

@mubarak23
Copy link

mubarak23 commented Jun 11, 2024

I will like to handle this

kindly assign

@LucasLvy
Copy link
Contributor Author

assigned, feel free to reach out if you have any question

@mubarak23
Copy link

can i deploy separate contract for different deceleration that has classhash

@LucasLvy
Copy link
Contributor Author

I'm not sure i understand the question. If the question is: "Can i deploy multiple contracts that have the same class hash" then the answer is yes

@mubarak23
Copy link

for each contract, i will create a function that deploy it.

@mubarak23
Copy link

@LucasLvy am able to deploy all the contract via snforge,

i need to refactor the 32 test cases one by one,

this will take a bit of time,

i will keep you posted as am proceeding with the test

@LucasLvy
Copy link
Contributor Author

sounds good, you can also open a draft pr now so it's easier to track the progress

@mubarak23
Copy link

@LucasLvy am using this address as admin

let address = contract_address_const::<0x123>() 
for 
component.initializer(address, address, address);

which set the admin

but i keep getting the following error

Failure data:
    "Only admin"

is there a specific admin we are using.

@mubarak23
Copy link

sounds good, you can also open a draft pr now so it's easier to track the progress
sure i will

@LucasLvy
Copy link
Contributor Author

Hard to say without the code, open the PR plz so i can see exactly where it comes from

@mubarak23
Copy link

Hard to say without the code, open the PR plz so i can see exactly where it comes from

sure let me push a draft PR

@LucasLvy
Copy link
Contributor Author

Can you dm me on telegram it'll be easier to chat. My username is lucasLvy

@LucasLvy
Copy link
Contributor Author

the problem is the following:

// This line changes all the calls to the contract deployed at admin_address so that get_caller_address() returns admin_address
start_prank(CheatTarget::One(admin_address), admin_address);
// What you really want to do is prank the component to think that admin address is calling him
// The component isn't deployed so you can't specify an address as cheat target so you can just do this
start_prank(CheatTarget::All, admin_address);

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