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

Mohit/currency manager #20

Closed

Conversation

Mohiiit
Copy link

@Mohiiit Mohiiit commented Dec 21, 2023

  1. updated the code of the currency_manager module which Implement Functions' Body for CurrencyManager Contract #5
  2. added tests for the module as well
  3. one key finding is that: we can't have function named onwer and transfer_ownership because they will clash with the ownable component we are using

@ametel01
Copy link
Contributor

@Mohiiit remove all the test we will open separate issues for those

@ametel01
Copy link
Contributor

@and1vo can you approve the workflows for this PR?

@possc
Copy link
Contributor

possc commented Dec 22, 2023

@and1vo can you approve the workflows for this PR?

Approved!

@possc
Copy link
Contributor

possc commented Dec 22, 2023

@and1vo can you approve the workflows for this PR?

I think the workflow fails because #19 hasn't been merged yet; we should resolve #19 first.

@Mohiiit Mohiiit force-pushed the mohit/currency_manager branch from fa7f6c5 to c6ee00e Compare December 22, 2023 04:15
@Mohiiit Mohiiit force-pushed the mohit/currency_manager branch from 8127aae to 5cddb1b Compare December 22, 2023 04:22
@ametel01
Copy link
Contributor

@and1vo can you approve the workflows for this PR?

I think the workflow fails because #19 hasn't been merged yet; we should resolve #19 first.

it doesn't look like any workflow has been run for this PR, there are still merge conflicts to be solved @Mohiiit

@Mohiiit
Copy link
Author

Mohiiit commented Dec 22, 2023

@and1vo can you approve the workflows for this PR?

I think the workflow fails because #19 hasn't been merged yet; we should resolve #19 first.

it doesn't look like any workflow has been run for this PR, there are still merge conflicts to be solved @Mohiiit

yes, I will solve the merge conflicts, I thought once the upgradable doubt is resolved, I will solve the merge conflicts

@ametel01
Copy link
Contributor

2 more thing:

  • add #[flat] decorator to component event.
  • add the ownable method to the ICurrencyManage interface only: fn owner() and fn transfer_ownership()

After that it LGTM!

@Mohiiit Mohiiit force-pushed the mohit/currency_manager branch from 17c21f4 to 10aefb2 Compare December 22, 2023 10:36
@Mohiiit Mohiiit force-pushed the mohit/currency_manager branch from 3047fb9 to d8b1ad9 Compare December 22, 2023 10:44
@Mohiiit Mohiiit requested a review from ametel01 December 22, 2023 10:50
fn is_currency_whitelisted(self: @TState, currency: ContractAddress) -> bool;
fn whitelisted_currency_count(self: @TState) -> usize;
fn whitelisted_currency(self: @TState, index: usize) -> ContractAddress;
}

#[starknet::interface]
trait ICurrencyManage<TState> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be ICurruncyManager

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be same as the interface just above, we can't have that

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i see what is the issue, you can remove completely the interface with Ownable functions, we will use IOwnable interface for testing. after that LGTM let's just wait for the workflow to be approved (not sure why it does still need approval). Also if you have problem with assert! formatting ContractAddress my last PR will fix that once merged you'll just have to import flex::{Debug, Display}; in your contract

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's failing because of the assert! formatting, I will pull and merge those changes, once they are merged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR that fixes your issue is merged

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mohiiit Hey man, any updates on this PR!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @and1vo, Yes I will update this branch, with the latest changes in place. was away for sometime, will do it asap

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @Mohiiit just checkin in!

@Mohiiit Mohiiit closed this Jan 7, 2024
@Mohiiit Mohiiit deleted the mohit/currency_manager branch January 7, 2024 20:59
@Mohiiit
Copy link
Author

Mohiiit commented Jan 7, 2024

I will create another pull request soon this week.

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

Successfully merging this pull request may close these issues.

3 participants