Skip to content

Commit

Permalink
Adds broadcasting info
Browse files Browse the repository at this point in the history
  • Loading branch information
gupnik committed Jan 2, 2025
1 parent a2c369b commit b53749b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions rust/chains/tw_aptos/tests/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,13 +786,14 @@ fn test_aptos_blind_sign() {
}"#);
}

// Successfully broadcasted: https://explorer.aptoslabs.com/txn/0x4eb6a65b1453e3f224d92b07aa8bf51eaa8b3f5bb5172cf28ebe62b527ae1010/payload?network=mainnet
#[test]
fn test_aptos_blind_sign_with_abi() {
let input = setup_proto_transaction(
"0x07968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f30", // Sender's address
"5d996aa76b3212142792d9130796cd2e11e3c445a93118c08414df4f66bc60ec", // Keypair
"blind_sign_json",
42, // Sequence number
66, // Sequence number
1,
100011,
3664390082,
Expand All @@ -818,9 +819,9 @@ fn test_aptos_blind_sign_with_abi() {
);
let output = Signer::sign_proto(input);
test_tx_result(output,
"07968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f302a00000000000000029770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da30a636f6e74726f6c6c6572076465706f736974010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e00030d0c4d61696e204163636f756e740880969800000000000100ab860100000000006400000000000000c2276ada0000000001", // Expected raw transaction bytes
"b2f8b30d244d4c4127db00d81bac14586e5e8be4de2d273a03ea6109f4944af9016472b4a75da0d8adc505233a76a0de2e322a63ffbb8bf4a60eb9acab33e20b", // Expected signature
"07968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f302a00000000000000029770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da30a636f6e74726f6c6c6572076465706f736974010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e00030d0c4d61696e204163636f756e740880969800000000000100ab860100000000006400000000000000c2276ada00000000010020ea526ba1710343d953461ff68641f1b7df5f23b9042ffa2d2a798d3adb3f3d6c40b2f8b30d244d4c4127db00d81bac14586e5e8be4de2d273a03ea6109f4944af9016472b4a75da0d8adc505233a76a0de2e322a63ffbb8bf4a60eb9acab33e20b", // Expected encoded transaction
"07968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f304200000000000000029770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da30a636f6e74726f6c6c6572076465706f736974010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e00030d0c4d61696e204163636f756e740880969800000000000100ab860100000000006400000000000000c2276ada0000000001", // Expected raw transaction bytes
"9f9a5a075b643ed7f2f8c6afb492dc384ad0b9600645ece7394e0060b14d440c9103bd00cc50f22c473c21ff3a7f0475d8600b19c83184b71722f0d3f8472903", // Expected signature
"07968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f304200000000000000029770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da30a636f6e74726f6c6c6572076465706f736974010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e00030d0c4d61696e204163636f756e740880969800000000000100ab860100000000006400000000000000c2276ada00000000010020ea526ba1710343d953461ff68641f1b7df5f23b9042ffa2d2a798d3adb3f3d6c409f9a5a075b643ed7f2f8c6afb492dc384ad0b9600645ece7394e0060b14d440c9103bd00cc50f22c473c21ff3a7f0475d8600b19c83184b71722f0d3f8472903", // Expected encoded transaction
r#"{
"expiration_timestamp_secs": "3664390082",
"gas_unit_price": "100",
Expand All @@ -838,10 +839,10 @@ fn test_aptos_blind_sign_with_abi() {
"type": "entry_function_payload"
},
"sender": "0x7968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f30",
"sequence_number": "42",
"sequence_number": "66",
"signature": {
"public_key": "0xea526ba1710343d953461ff68641f1b7df5f23b9042ffa2d2a798d3adb3f3d6c",
"signature": "0xb2f8b30d244d4c4127db00d81bac14586e5e8be4de2d273a03ea6109f4944af9016472b4a75da0d8adc505233a76a0de2e322a63ffbb8bf4a60eb9acab33e20b",
"signature": "0x9f9a5a075b643ed7f2f8c6afb492dc384ad0b9600645ece7394e0060b14d440c9103bd00cc50f22c473c21ff3a7f0475d8600b19c83184b71722f0d3f8472903",
"type": "ed25519_signature"
}
}"#);
Expand Down

0 comments on commit b53749b

Please sign in to comment.