Skip to content

Commit

Permalink
feat(stellar-gateway): update gateway message approval args consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
ahramy committed Oct 21, 2024
1 parent a0527da commit 98965d7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0000001000000001000000020000001000000001000000010000001100000001000000050000000f00000010636f6e74726163745f61646472657373000000120000000100000000000000000000000000000000000000000000000000000000000000060000000f0000000a6d6573736167655f696400000000000e00000004746573740000000f0000000c7061796c6f61645f686173680000000d00000020595c9108df17d1cc43e8268ec1516064299c1388bcc86fdd566bcdf400a0a1ed0000000f0000000e736f757263655f6164647265737300000000000e0000003843414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141484b334d0000000f0000000c736f757263655f636861696e0000000e00000006736f7572636500000000001100000001000000030000000f000000056e6f6e63650000000000000d0000002000000000000000000000000000000000000000000000000000000000000007e80000000f000000077369676e657273000000001000000001000000030000001100000001000000020000000f000000097369676e61747572650000000000001000000001000000020000000f000000065369676e656400000000000d00000040b5b3b0749aa585f866d802e32ca4a6356f82eb52e2a1b4797cbaa30f3d755462f2eb995c70d9099e436b8a48498e4d613ff2d3ca7618973a36c2fde17493180f0000000f000000067369676e657200000000001100000001000000020000000f000000067369676e657200000000000d0000002012f7d9a9463212335914b39ee90bfa2045f90b64c1f2d7b58ed335282abac4a40000000f00000006776569676874000000000009000000000000000000000000000000080000001100000001000000020000000f000000097369676e61747572650000000000001000000001000000010000000f00000008556e7369676e65640000000f000000067369676e657200000000001100000001000000020000000f000000067369676e657200000000000d000000204c3863e4b0252a8674c1c6ad70b3ca3002b400b49ddfae5583b21907e65c5dd80000000f00000006776569676874000000000009000000000000000000000000000000010000001100000001000000020000000f000000097369676e61747572650000000000001000000001000000020000000f000000065369676e656400000000000d0000004028e2c8accfa1c2db93349c6d3f783004d6a92cdbf322b92b3555315999e0eaf5d8bdf9deb58d798168a880972e81b8513dcb942de44862317d501cf7445c660a0000000f000000067369676e657200000000001100000001000000020000000f000000067369676e657200000000000d00000020c35aa94d2038f258ecb1bb28fbc8a83ab79d2dc0a7223fd528a8f52a14c032920000000f00000006776569676874000000000009000000000000000000000000000000070000000f000000097468726573686f6c64000000000000090000000000000000000000000000000a
0000001000000001000000020000001000000001000000010000001100000001000000050000000f0000000c736f757263655f636861696e0000000e00000006736f7572636500000000000f0000000a6d6573736167655f696400000000000e00000004746573740000000f0000000e736f757263655f6164647265737300000000000e0000003843414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141484b334d0000000f00000010636f6e74726163745f61646472657373000000120000000100000000000000000000000000000000000000000000000000000000000000060000000f0000000c7061796c6f61645f686173680000000d00000020595c9108df17d1cc43e8268ec1516064299c1388bcc86fdd566bcdf400a0a1ed0000001100000001000000030000000f000000056e6f6e63650000000000000d0000002000000000000000000000000000000000000000000000000000000000000007e80000000f000000077369676e657273000000001000000001000000030000001100000001000000020000000f000000097369676e61747572650000000000001000000001000000020000000f000000065369676e656400000000000d00000040b5b3b0749aa585f866d802e32ca4a6356f82eb52e2a1b4797cbaa30f3d755462f2eb995c70d9099e436b8a48498e4d613ff2d3ca7618973a36c2fde17493180f0000000f000000067369676e657200000000001100000001000000020000000f000000067369676e657200000000000d0000002012f7d9a9463212335914b39ee90bfa2045f90b64c1f2d7b58ed335282abac4a40000000f00000006776569676874000000000009000000000000000000000000000000080000001100000001000000020000000f000000097369676e61747572650000000000001000000001000000010000000f00000008556e7369676e65640000000f000000067369676e657200000000001100000001000000020000000f000000067369676e657200000000000d000000204c3863e4b0252a8674c1c6ad70b3ca3002b400b49ddfae5583b21907e65c5dd80000000f00000006776569676874000000000009000000000000000000000000000000010000001100000001000000020000000f000000097369676e61747572650000000000001000000001000000020000000f000000065369676e656400000000000d0000004028e2c8accfa1c2db93349c6d3f783004d6a92cdbf322b92b3555315999e0eaf5d8bdf9deb58d798168a880972e81b8513dcb942de44862317d501cf7445c660a0000000f000000067369676e657200000000001100000001000000020000000f000000067369676e657200000000000d00000020c35aa94d2038f258ecb1bb28fbc8a83ab79d2dc0a7223fd528a8f52a14c032920000000f00000006776569676874000000000009000000000000000000000000000000070000000f000000097468726573686f6c64000000000000090000000000000000000000000000000a
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0d29098e3f5a7ead5c97c0f8e74051e1de9cb601105551f8d4a898187e0f4f0d
344590fc7787e0bbfee71155ee0e7a5610cc2bc04446a5b200b3d028aed8c3fe
16 changes: 8 additions & 8 deletions external-gateways/stellar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ impl TryFrom<CommandType> for ScVal {

#[derive(Debug, Clone)]
pub struct Message {
pub message_id: String,
pub source_chain: String,
pub message_id: String,
pub source_address: String,
pub contract_address: Contract,
pub payload_hash: Hash,
Expand All @@ -75,19 +75,19 @@ impl TryFrom<Message> for ScVal {

fn try_from(value: Message) -> Result<Self, XdrError> {
let keys: [&'static str; 5] = [
"contract_address",
"source_chain",
"message_id",
"payload_hash",
"source_address",
"source_chain",
"contract_address",
"payload_hash",
];

let vals: [ScVal; 5] = [
ScVal::Address(ScAddress::Contract(Hash(value.contract_address.0))),
ScVal::String(StringM::from_str(&value.source_chain)?.into()),
ScVal::String(StringM::from_str(&value.message_id)?.into()),
ScVal::Bytes(BytesM::try_from(AsRef::<[u8; 32]>::as_ref(&value.payload_hash))?.into()),
ScVal::String(StringM::from_str(&value.source_address)?.into()),
ScVal::String(StringM::from_str(&value.source_chain)?.into()),
ScVal::Address(ScAddress::Contract(Hash(value.contract_address.0))),
ScVal::Bytes(BytesM::try_from(AsRef::<[u8; 32]>::as_ref(&value.payload_hash))?.into()),
];

sc_map_from_slices(&keys, &vals)
Expand Down Expand Up @@ -429,8 +429,8 @@ mod test {

let messages: Messages = (1..=4)
.map(|i| Message {
message_id: format!("test-{}", i),
source_chain: format!("source-{}", i),
message_id: format!("test-{}", i),
source_address: "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M"
.to_string(),
contract_address: "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDR4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
49f6a85aec4b4f72c667f2ba7950a692a59f462007abdbce0181e2982c0b602e
da3910a0a3f2497c2a84986c69ce5ad2fba978a1686ce3edf2fbaaaa35db0206

0 comments on commit 98965d7

Please sign in to comment.