vault icon indicating copy to clipboard operation
vault copied to clipboard

Migrate to starknet foundry

Open 0xLucqs opened this issue 1 year ago • 15 comments

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

0xLucqs avatar Jun 11 '24 13:06 0xLucqs

I will like to handle this

kindly assign

mubarak23 avatar Jun 11 '24 13:06 mubarak23

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

0xLucqs avatar Jun 11 '24 14:06 0xLucqs

can i deploy separate contract for different deceleration that has classhash

mubarak23 avatar Jun 17 '24 12:06 mubarak23

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

0xLucqs avatar Jun 17 '24 13:06 0xLucqs

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

mubarak23 avatar Jun 18 '24 12:06 mubarak23

@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

mubarak23 avatar Jun 19 '24 13:06 mubarak23

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

0xLucqs avatar Jun 19 '24 14:06 0xLucqs

@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 avatar Jun 19 '24 14:06 mubarak23

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

mubarak23 avatar Jun 19 '24 14:06 mubarak23

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

0xLucqs avatar Jun 19 '24 14:06 0xLucqs

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

mubarak23 avatar Jun 19 '24 14:06 mubarak23

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

0xLucqs avatar Jun 19 '24 15:06 0xLucqs

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);

0xLucqs avatar Jun 19 '24 16:06 0xLucqs

@LucasLvy seems like there were no progress here for one month . Can I tackle this issue ?

quentin-abei avatar Jul 26 '24 02:07 quentin-abei

For now vault is paused we need to decide on the future

0xLucqs avatar Jul 26 '24 12:07 0xLucqs