0

after successfully signed the transaction, when i try to push it using the pyton api from the eos developers portal, i got the following error

{'code': 500, 'message': 'Internal Service Error', 'error': {'code': 3040005, 'name': 'expired_tx_exception', 'what': 'Expired Transaction', 'details': [{'message': 'expired transaction 8d189e096aae30e91c82b963e97f7a6c33b1ed647cc92b76fc013a2a2434998e', 'file': 'producer_plugin.cpp', 'line_number': 405, 'method': 'process_incoming_transaction_async'}]}}

The python code is given below

payload = [
{
"ref_block_num": block_no,
"ref_block_prefix": reference_block_prefix,
"expiration": timestamp,
"actions": [
{
        "account": "certcontract",
        "name": "issue",
        "authorization": [
        {
        "actor": accName,
        "permission": "active"
        }
        ],
        "data": bindata
}
],
"signatures": []
},
[
required_key
],
"e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473"
]

headers = {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}
response = requests.request("POST", "http://127.0.0.1:8888/v1/wallet/sign_transaction", headers=headers, data = json.dumps(payload))
sign = json.loads(response.text)

# expiration = sign[0].expiration
# signatures = sign[0].signatures


expiration = sign['expiration']
signatures = sign['signatures']
# print(sign)
# print(expiration)
# print(signatures)



payload1 = {
"compression": "none",
"transaction": {
"expiration": expiration,
"ref_block_num": block_no,
"ref_block_prefix": reference_block_prefix,
"context_free_actions": [],
"actions": [
        {
        "account": "certcontract",
        "name": "issue",
        "authorization": [
                {
                "actor": accName,
                "permission": "active"
                }
        ],
        "data": bindata
        }
],
"transaction_extensions": []
},
"signatures": signatures

}

response = requests.request("POST", "https://api.jungle.alohaeos.com:443/v1/chain/push_transaction", data = json.dumps(payload1))
push = json.loads(response.text)
print(push)

And the output after siging the transaction given below

{'expiration': '2019-04-18T04:09:07', 'ref_block_num': 6814, 'ref_block_prefix': 3945015726, 'max_net_usage_words': 0, 'max_cpu_usage_ms': 0, 'delay_sec': 0, 'context_free_actions': [], 'actions': [{'account': 'certcontract', 'name': 'issue', 'authorization': [{'actor': 'terminatoroo', 'permission': 'active'}], 'data': '40e9a5d94c27afca124861727761726420556e697665727369747916726f6f74206275696c6465642062792073616368696e'}], 'transaction_extensions': [], 'signatures': ['SIG_K1_JxWzqizv9gh7bdPYzNMa3jSdXKqfWvosnuraiD5bMykjYzTPiYQ6ZCzpcqJRu5aRLgWVTU46ycGxYXigZZD9cwn3mKvbMU'], 'context_free_data': []}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.