-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request support on contract usage #1026
Comments
@Keith-CY Hi, I would like to take a look the failed tx. But I can't find it. Could you please provide a link to to the failed tx? |
@magicalne curl --location --request POST https://v1.testnet.godwoken.io/rpc/ --header 'Content-Type: application/json' --data-raw '{"id": 2866772054050555, "jsonrpc": "2.0", "method": "gw_debug_replay_transaction", "params": ["0xacf47527fe55114fadc3fc319ecbddb5f9d7203b97b9e39f91237ac787016a02"]}' {"jsonrpc":"2.0","id":2866772054050555,"result":null} |
That's where you need curl --location --request POST 'https://v1.testnet.godwoken.io/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "poly_getGwTxHashByEthTxHash",
"params": [
"0x183466fab616eeca6cc4aa605a101b288e6b8743b811fc2d432718148218815e"
],
"id": 74
}' Then you can debug the failed tx by sending debug replay rpc with the godwoken tx hash. |
I just check the contract log. I cannot tell what's wrong with the contract code.
|
After adjusting as you said, the RPC is called to get the data, please take a look. {"jsonrpc":"2.0","id":2866772054050555,"result":{"cycles":{"execution":"0x2b60c1","total":"0x2b60c1","virtual":"0x0"},"debug_log":["","v1.5.3","BEGIN parse_message()","args_len => 2424","[call_kind] => 0","[gas_limit] => 458595","[gas_price] => 100000000000","[input_size] => 2372","END parse_message()","load_account_script, account_id: => 21280","load_account_script, account_id: => 4","chain_id => 71401","creator_account_id => 4","g_rollup_script_hash 0x702359ea7f073558921eb50d8c1c77e92f760c8f8656bde4995f26b8963e2dd8","g_sudt_id => 1","[run_polyjuice] initial gas limit => 458595","[run_polyjuice] take a snapshot id => 1","load_account_script, account_id: => 21280","[load_account_code] account_id => 21280","[load_account_code] code_size before loading => 24576","[load_account_code] code_size after loading => 5532","[handle_transfer] sender 0x7c3321c073b071f8eedf4e121f6693eee48a9a67","[handle_transfer] destination 0xde2022a8ab68ae86b0cd3ba5efa10aab859d0293","[handle_transfer] msg->value 0x0000000000000000000000000000000000000000000000000000000000000000","[handle_message] msg.kind => 0","[execute_in_evmone] code size => 5532","[execute_in_evmone] input_size => 2372","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","BEGIN get_storage","END get_storage","BEGIN get_storage","END get_storage","BEGIN set_storage","END set_storage","[handle_message] used_memory(Bytes) => 1824","[handle_message] gas left => 30000","[handle_message] status_code => 0","[run_polyjuice] gas left => 30000","[run_polyjuice] gas_used => 428595","set return data size => 0","[run_polyjuice] finalize"],"execution_time_ms":9,"exit_code":0,"logs":[{"account_id":"0x5320","data":"0x338a060000000000338a060000000000000000000000000000000000000000000000000000000000","service_flag":"0x2"},{"account_id":"0x1","data":"0x02000000140000007c3321c073b071f8eedf4e121f6693eee48a9a670200000014000000715ab282b873b79a7be8b0e8c13c4e8966a520400038c0f87c449800000000000000000000000000000000000000000000000000","service_flag":"0x1"}],"read_data_hashes":["0xea1b45c30d644dee17d7f41425e89346af18a8da7231052786faf23cdc5f4b0d"],"return_data":"0x","write_data_hashes":[],"write_mem_smt_time_ms":2}}% |
Please take a look my last reply. And how about running this contract on hardhat? Does hardhat throw any error? |
@magicalne Thanks for your answer. |
Hi team, we(gwscan team) are going to verify the feature of showing data of the target contract on the proxy contract page.
We've deployed a pair of proxy contract and implementation contract but failed to invoke them. An error message
was returned
The source code of contracts have been uploaded at https://gist.github.com/FrederLu/7978291563509a94020afb31cca2f01a
We have checked it but haven't located the error since we're unfamiliar with the proxy contract.
Could you team do us a favor to have a look at the code? Thanks in advance
The text was updated successfully, but these errors were encountered: