Skip to content

Commit

Permalink
fix: declare v0 endpoint added
Browse files Browse the repository at this point in the history
  • Loading branch information
mohiiit committed Dec 10, 2024
1 parent 06873f1 commit fd600e0
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: Workflow - Pull Request
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: madara-alliance/madara
ref: "d188aa91efa78bcc54f92aa1035295fd50e068d2"
ref: "031da9ed68b540c0ab6e22e12bf1ca94222aa44a"
path: madara

- name: Run anvil
Expand Down
1 change: 1 addition & 0 deletions src/configs/devnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"eth_rpc": "http://127.0.0.1:8545",
"eth_priv_key": "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
"rollup_seq_url": "http://127.0.0.1:9944",
"rollup_declare_v0_seq_url": "http://127.0.0.1:9943",
"rollup_priv_key": "0xabcd",
"eth_chain_id": 31337,
"l1_deployer_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ pub struct ConfigFile {
pub eth_rpc: String,
pub eth_priv_key: String,
pub rollup_seq_url: String,
pub rollup_declare_v0_seq_url: String,
pub rollup_priv_key: String,
pub eth_chain_id: u64,
pub l1_deployer_address: String,
Expand Down Expand Up @@ -107,6 +108,7 @@ impl Default for ConfigFile {
eth_rpc: "http://127.0.0.1:8545".to_string(),
eth_priv_key: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80".to_string(),
rollup_seq_url: "http://127.0.0.1:19944".to_string(),
rollup_declare_v0_seq_url: "http://127.0.0.1:19943".to_string(),
rollup_priv_key: "0xabcd".to_string(),
eth_chain_id: 31337,
l1_deployer_address: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion src/setup_scripts/account_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub async fn account_init<'a>(clients: &'a Clients, arg_config: &'a ConfigFile)
// Making temp account for declaration of OZ account Cairo 1 contract
let oz_account_class_hash = declare_contract(DeclarationInput::LegacyDeclarationInputs(
String::from(OZ_ACCOUNT_PATH),
arg_config.rollup_seq_url.clone(),
arg_config.rollup_declare_v0_seq_url.clone(),
clients.provider_l2(),
))
.await;
Expand Down
2 changes: 1 addition & 1 deletion src/setup_scripts/braavos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl<'a> BraavosSetup<'a> {

let braavos_aggregator_class_hash = declare_contract(DeclarationInput::LegacyDeclarationInputs(
String::from(BRAAVOS_AGGREGATOR_PATH),
self.arg_config.rollup_seq_url.clone(),
self.arg_config.rollup_declare_v0_seq_url.clone(),
self.clients.provider_l2(),
))
.await;
Expand Down
8 changes: 4 additions & 4 deletions src/setup_scripts/eth_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<'a> EthBridge<'a> {
pub async fn setup(&self) -> EthBridgeSetupOutput {
let legacy_proxy_class_hash = declare_contract(DeclarationInput::LegacyDeclarationInputs(
String::from(PROXY_LEGACY_PATH),
self.arg_config.rollup_seq_url.clone(),
self.arg_config.rollup_declare_v0_seq_url.clone(),
self.clients.provider_l2(),
))
.await;
Expand All @@ -67,7 +67,7 @@ impl<'a> EthBridge<'a> {

let starkgate_proxy_class_hash = declare_contract(DeclarationInput::LegacyDeclarationInputs(
String::from(STARKGATE_PROXY_PATH),
self.arg_config.rollup_seq_url.clone(),
self.arg_config.rollup_declare_v0_seq_url.clone(),
self.clients.provider_l2(),
))
.await;
Expand All @@ -78,7 +78,7 @@ impl<'a> EthBridge<'a> {

let erc20_legacy_class_hash = declare_contract(DeclarationInput::LegacyDeclarationInputs(
String::from(ERC20_LEGACY_PATH),
self.arg_config.rollup_seq_url.clone(),
self.arg_config.rollup_declare_v0_seq_url.clone(),
self.clients.provider_l2(),
))
.await;
Expand All @@ -89,7 +89,7 @@ impl<'a> EthBridge<'a> {

let legacy_eth_bridge_class_hash = declare_contract(DeclarationInput::LegacyDeclarationInputs(
String::from(LEGACY_BRIDGE_PATH),
self.arg_config.rollup_seq_url.clone(),
self.arg_config.rollup_declare_v0_seq_url.clone(),
self.clients.provider_l2(),
))
.await;
Expand Down
2 changes: 1 addition & 1 deletion src/setup_scripts/udc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl<'a> UdcSetup<'a> {
pub async fn setup(&self) -> UdcSetupOutput {
let udc_class_hash = declare_contract(DeclarationInput::LegacyDeclarationInputs(
String::from(UDC_PATH),
self.arg_config.rollup_seq_url.clone(),
self.arg_config.rollup_declare_v0_seq_url.clone(),
self.clients.provider_l2(),
))
.await;
Expand Down
1 change: 1 addition & 0 deletions src/tests/constants.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pub const ETH_RPC: &str = "http://127.0.0.1:8545";
pub const ETH_PRIV_KEY: &str = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
pub const ROLLUP_SEQ_URL: &str = "http://127.0.0.1:19944";
pub const ROLLUP_DECLARE_V0_SEQ_URL: &str = "http://127.0.0.1:19943";
pub const ROLLUP_PRIV_KEY: &str = "0xabcd";
pub const ETH_CHAIN_ID: &str = "31337";
pub const L1_DEPLOYER_ADDRESS: &str = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266";
Expand Down
5 changes: 3 additions & 2 deletions src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ async fn wait_for_madara() -> color_eyre::Result<()> {
.arg("0")
.arg("--blob-gas-price")
.arg("0")
.arg("--rpc-methods")
.arg("unsafe")
.arg("--rpc-admin")
.arg("--rpc-admin-port")
.arg("19943")
.arg("--l1-endpoint")
.arg("http://localhost:8545")
.spawn()?;
Expand Down

0 comments on commit fd600e0

Please sign in to comment.