When calling: https://api.testnet.aptoslabs.com/v1/transactions/simulate, prompt: invalid_input #541
Unanswered
Dong-Jianguo
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Discord user ID
No response
Describe your question in detail.
I want to use Aptos's api to simulate transactions, where the transaction type I use is: script_payload.
This is the API I requested: https://api.testnet.aptoslabs.com/v1/transactions/simulate?estimate_gas_unit_price=true&estimate_max_gas_amount=true
Here are my parameters:
{
"sender": "0xc3196b462bf1ce2da0ea951254dacbb04a018a41366fb52325687342a35f2499",
"sequence_number": "175",
"max_gas_amount": "400000",
"gas_unit_price": "100",
"expiration_timestamp_secs": "1742586758",
"payload": {
"code": {
"bytecode": "0xa11ceb0b0700000a06010006020604030a0c05160b072140086160000 0010102020003070002040001000101050201000103060c0a02080000010 a0206737472696e6703617070066f7261636c6506537472696e671666756 c66696c6c5f6f7261636c655f726571756573740f6f7261636c655f72657 3706f6e736500000000000000000000000000000000000000000000000000000000000011ea0ea8bf782d479bb571f94317da3020849c5ed7274 81ad6a5c6ba49787f31c468a49e08a8993fc2ea78f1abe35430067d489e7 f29dfc7b843335405897427d000001070b000a010b0211000b01110102",
"abi": { "view": false, "return": [], "entry": true, "name": "main", "visibility": "public", "is_entry": true, "is_view": false, "generic_type_params": [], "params": [ "&signer", "vector", "0x1::string::String" ] } }, "type": "script_payload", "function": "0x468a49e08a8993fc2ea78f1abe35430067d489e7f29dfc7b843335405897427d::oracle::fulfill_oracle_request", "type_arguments": [], "arguments": [ "ec5e0d005b814fd237876e237fb44eaccf6767fc129552bbd27981d38367cdcb", "djgtest222222" ] }, "signature": { "public_key": "0x238293c76362aa01d6e38d43edcbff5fba7ec9b54a82fa863a322a1d89c8e2ba", "sender": null, "signature": "0x00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000", "type": "ed25519_signature" } } This is the response: { "message": "Failed to create SignedTransaction from SubmitTransactionRequest: Failed to parse transaction payload: invalid transaction argument: Struct(Runtime([Vector([U8(100), U8(106), U8(103), U8(116), U8(101), U8(115), U8(116), U8(50), U8(50), U8(50), U8(50), U8(50), U8(50)])]))", "error_code": "invalid_input", "vm_error_code": null }
What error, if any, are you getting?
Failed to create SignedTransaction from SubmitTransactionRequest: Failed to parse transaction payload: invalid transaction argument: Struct(Runtime([Vector([U8(100), U8(106), U8(103), U8(116), U8(101), U8(115), U8(116), U8(50), U8(50), U8(50), U8(50), U8(50), U8(50)])]))
What have you tried or looked at? Or how can we reproduce the error?
No response
Which operating system are you using?
N/A
Which SDK or tool are you using? (if any)
REST API
Describe your environment or tooling in detail
Calling Aptos API using Java
Beta Was this translation helpful? Give feedback.
All reactions