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

Implement Update Refunder during Deployment #854

Draft
wants to merge 1 commit into
base: musitdev/e2e_mvt_eth_happy_path
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion protocol-units/bridge/setup/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), a

if !update_bridge_operator_output.stdout.is_empty() {
println!(
"run-script update_bridge_operatorstdout: {}",
"run-script update_bridge_operator_stdout: {}",
String::from_utf8_lossy(&update_bridge_operator_output.stdout)
);
}
Expand All @@ -344,6 +344,35 @@ pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), a
);
}

let update_refunder_output = Command::new("movement")
.args(&[
"move",
"run-script",
"--compiled-script-path",
"protocol-units/bridge/move-modules/build/bridge-modules/bytecode_scripts/update_refunder.mv",
"--args",
"address:0xf90391c81027f03cdea491ed8b36ffaced26b6df208a9b569e5baf2590eb9b16",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this guaranteed to work?

Copy link
Collaborator

@l-monninger l-monninger Nov 14, 2024

Choose a reason for hiding this comment

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

Why can you hardcode an address here? Are we always using the same one in local development?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's hardcoded, just mimicked the current relayer one. I suspect that for mainnet we would set a new one.

"--profile",
"default",
"--assume-yes",
])
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()?;

if !update_refunder_output.stdout.is_empty() {
println!(
"run-script update_refunder_stdout: {}",
String::from_utf8_lossy(&update_refunder_output.stdout)
);
}
if !update_refunder_output.stderr.is_empty() {
eprintln!(
"run-script update_refunder supdate_refunder tderr: {}",
String::from_utf8_lossy(&update_refunder_output.stderr)
);
}

let set_initiator_time_lock_script_output = Command::new("movement")
.args(&[
"move",
Expand Down