Skip to content

Commit 99d5161

Browse files
Update analyze-decoded-values.ts to correct function calls for retrieving decoded values. The script now accurately fetches and logs the raw message alongside other decoded values, enhancing the analysis output.
1 parent fea0b63 commit 99d5161

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

examples/oapp-aptos-move/scripts/analyze-decoded-values.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async function main() {
1212
console.log('---')
1313

1414
// Get all decoded values
15-
const [counterResult, decodedCounterResult, address1Result, address2Result, numberResult] = await Promise.all([
15+
const [counterResult, address1Result, address2Result, numberResult, rawMessageResult] = await Promise.all([
1616
aptos.view({
1717
payload: {
1818
function: `${oappAddress}::oapp::get_counter`,
@@ -21,36 +21,36 @@ async function main() {
2121
}),
2222
aptos.view({
2323
payload: {
24-
function: `${oappAddress}::oapp::get_decoded_counter`,
24+
function: `${oappAddress}::oapp::get_decoded_address1`,
2525
typeArguments: [],
2626
},
2727
}),
2828
aptos.view({
2929
payload: {
30-
function: `${oappAddress}::oapp::get_decoded_address1`,
30+
function: `${oappAddress}::oapp::get_decoded_address2`,
3131
typeArguments: [],
3232
},
3333
}),
3434
aptos.view({
3535
payload: {
36-
function: `${oappAddress}::oapp::get_decoded_address2`,
36+
function: `${oappAddress}::oapp::get_decoded_number`,
3737
typeArguments: [],
3838
},
3939
}),
4040
aptos.view({
4141
payload: {
42-
function: `${oappAddress}::oapp::get_decoded_number`,
42+
function: `${oappAddress}::oapp::get_raw_message`,
4343
typeArguments: [],
4444
},
4545
}),
4646
])
4747

4848
console.log('Current decoded values:')
4949
console.log('- Counter:', counterResult[0])
50-
console.log('- Decoded Counter:', decodedCounterResult[0])
5150
console.log('- Address 1:', address1Result[0])
5251
console.log('- Address 2:', address2Result[0])
5352
console.log('- Number:', numberResult[0])
53+
console.log('- Raw Message:', rawMessageResult[0])
5454
console.log('---')
5555
}
5656

0 commit comments

Comments
 (0)