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

feat : added nominate functions and starknet core contract types #6

Merged
merged 8 commits into from
Aug 6, 2024

Conversation

ocdbytes
Copy link
Member

@ocdbytes ocdbytes commented Jun 27, 2024

  • Add nominate governor in eth bridge proxy, core contracts and token bridge proxy ✅
  • Add flag in cli to choose between sovereign and validity starknet core contract. ✅

To run in dev mode :

RUST_LOG=info cargo run -- --dev

Copy link
Contributor

@apoorvsadana apoorvsadana left a comment

Choose a reason for hiding this comment

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

Let's also nominate governors for the L2 bridge?

use crate::contract_clients::starknet_validity::StarknetValidityContract;
use crate::utils::convert_felt_to_u256;

pub enum CoreContractStarknetL1Enum {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need this enum? Can we not implement trait CoreContract for StarknetSovereignContract and StarknetValidityContract and when we call those methods we call them with Box<dyn CoreContract>

Copy link
Member Author

Choose a reason for hiding this comment

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

can you give an example of this ? I didn't get it I added dyn CoreContract wherever required.

Copy link
Contributor

Choose a reason for hiding this comment

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

was this fixed, looks like it was

Copy link
Member Author

Choose a reason for hiding this comment

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

yes it is fixed now

use crate::CliArgs;

pub struct CoreContractStarknetL1<'a> {
arg_config: &'a CliArgs,
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be only the relevant args needed

Copy link
Member Author

Choose a reason for hiding this comment

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

clippy suggested it so I added otherwise it was giving the errors

Copy link
Contributor

Choose a reason for hiding this comment

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

what I mean is that we shouldn't pass the entire struct CliArgs because it has a lot of irrelevant stuff. we just need to pass those fields which are needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

this is pending

Copy link
Member Author

Choose a reason for hiding this comment

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

skipped

src/setup_scripts/core_contract.rs Outdated Show resolved Hide resolved
@@ -82,5 +82,7 @@ fn get_config() -> CliArgs {
l1_multisig_address: String::from(L1_MULTISIG_ADDRESS),
l2_multisig_address: String::from(L2_MULTISIG_ADDRESS),
verifier_address: String::from(VERIFIER_ADDRESS),
operator_address: String::from(OPERATOR_ADDRESS),
dev: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we test without dev as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Contributor

Choose a reason for hiding this comment

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

can we test without dev flag?

src/tests/constants.rs Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@ocdbytes ocdbytes merged commit 56b7579 into main Aug 6, 2024
5 checks passed
@ocdbytes ocdbytes deleted the feat/adding-nominate-functions branch August 6, 2024 12:25
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.

2 participants