Skip to content

Commit

Permalink
chore(multisig-prover): integrate with gateway v5.9.0 (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
haiyizxx authored May 14, 2024
1 parent 7e0bfb7 commit 194b8bb
Show file tree
Hide file tree
Showing 5 changed files with 268 additions and 22 deletions.
8 changes: 4 additions & 4 deletions contracts/multisig-prover/src/encoding/abi/execute_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,17 @@ mod tests {
fn approve_messages_function_data() {
// ApproveMessages function calldata hash generated by axelar-gmp-sdk-solidity unit tests
let expected_data_hash =
HexBinary::from_hex("cf6200f6889b7157af0bfcb2eaaabc03d89b94428dcbe613f5844f4f593c050d")
HexBinary::from_hex("973b422c8af25ef10a916130e2918667c15f791234a7ed449dbeae3cf9129f5d")
.unwrap();

let domain_separator = domain_separator();
let worker_set = curr_worker_set();

// Generated signatures are already sorted by weight and evm address
let sigs: Vec<_> = vec![
"6e320a96a33260b488c6c4a2fa007345a4db974bf9d94a9568edf79452ee0e805eedb7c4e67ce16fb5cc0691b04b5caf3b0014e1133d5175a9bc47d917f57e251c",
"fdd7269bbc41946f73ca744a4037fd1e9fcf2d2a93db8cfe2143c2b0ea52bd96300c7f61803cebaff1590bc137ca0503697a502d06a1c4998aaceb77c0a91c6b1c",
"01363790ed71e5070be5d79277350b3300cbba90b1141dbcf49103eaf113178c30947ff9fb293d23860aa33150b883e0852faae0fad1218550a8c730ac9961fc1b",
"756473c3061df7ea3fef7c52e0e875dca2c93f08ce4f1d33e694d64c713a56842017d92f0a1b796afe1c5343677ff261a072fb210ff3d43cc2784c0774d4da7b1b",
"5bdad2b95e700283402392a2f5878d185f92d588a6b4868460977c4f06f4216f0452c2e215c2878fe6e146db5b74f278716a99b418c6b2cb1d812ad28e686cd81c",
"4c9c52a99a3941a384c4a80b3c5a14c059020d3d2f29be210717bdb9270ed55937fcec824313c90c198188ea8eb3b47c2bafe5e96c11f79ec793d589358024191b",
].into_iter().map(|sig| HexBinary::from_hex(sig).unwrap()).collect();

let signers_with_sigs = signers_with_sigs(worker_set.signers.values(), sigs);
Expand Down
4 changes: 2 additions & 2 deletions contracts/multisig-prover/src/encoding/abi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ impl TryFrom<&RouterMessage> for Message {
let payload_hash = FixedBytes::<32>::from_slice(msg.payload_hash.as_slice());

Ok(Message {
messageId: msg.cc_id.id.to_string(),
sourceChain: msg.cc_id.chain.to_string(),
messageId: msg.cc_id.id.to_string(),
sourceAddress: msg.source_address.to_string(),
contractAddress: contract_address,
payloadHash: payload_hash,
Expand Down Expand Up @@ -269,7 +269,7 @@ mod tests {
fn approve_messages_hash() {
// generated by axelar-gmp-sdk-solidity unit tests
let expected_hash =
HexBinary::from_hex("2ab230ae08c9fc5e9110c08061a9dffe928a1093133a6f157316fb9c90bf825c")
HexBinary::from_hex("58fec5536ad39d7992fd39cc75cf857f21aa2a9124b15faf328928fd635fd2e0")
.unwrap();

let domain_separator = domain_separator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ enum CommandType {

/**
* @notice This struct represents a message that is to be processed by the Amplifier Gateway
* @param messageId The unique identifier for the message
* @param sourceChain The chain from which the message originated
* @param messageId The unique identifier for the message
* @param sourceAddress The address from which the message originated
* @param contractAddress The address of the contract that the message is intended for
* @param payloadHash The hash of the payload that is to be processed
*/
struct Message {
string messageId;
string sourceChain;
string messageId;
string sourceAddress;
address contractAddress;
bytes32 payloadHash;
Expand Down
Loading

0 comments on commit 194b8bb

Please sign in to comment.