edit blockchain payload encoding

This commit is contained in:
user 2024-08-29 21:43:32 +03:00
parent cb04ccfa83
commit df66b95e0a
1 changed files with 4 additions and 4 deletions

View File

@ -95,7 +95,7 @@ async def s_api_v1_blockchain_send_new_content_message(request):
return response.json({
'address': platform.address.to_string(1, 1, 1),
'amount': str(int(0.15 * 10 ** 9)),
'payload': (
'payload': b64encode(
begin_cell()
.store_uint(0x5491d08c, 32)
.store_uint(int.from_bytes(encrypted_content_cid.content_hash, "big", signed=False), 256)
@ -129,7 +129,7 @@ async def s_api_v1_blockchain_send_new_content_message(request):
.end_cell()
)
.end_cell().to_boc(False)
).hex()
).decode()
})
except BaseException as e:
make_log("Blockchain", f"Error while sending new content message: {e}" + '\n' + traceback.format_exc(), level='error')
@ -155,7 +155,7 @@ async def s_api_v1_blockchain_send_purchase_content_message(request):
return response.json({
'address': request.json['content_address'],
'amount': str(int(licenses_cost['resale']['price'])),
'payload': (
'payload': b64encode((
begin_cell()
.store_uint(0x2a319593, 32)
.store_uint(0, 64)
@ -166,5 +166,5 @@ async def s_api_v1_blockchain_send_purchase_content_message(request):
# }[request.json['license_type']], 8)
.store_uint(0, 256)
.end_cell()
).to_boc(False).hex()
).to_boc(False)).decode()
})