From c37f8da04003e396e40e85ca4f6b5756e56d1914 Mon Sep 17 00:00:00 2001 From: Uncle Stretch Date: Mon, 13 Apr 2026 19:05:51 +0300 Subject: [PATCH] fix for the proposal id parsing Signed-off-by: Uncle Stretch --- main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index ba46254..c231c64 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,7 @@ import logging from dotenv import load_dotenv from web3 import Web3 +from eth_abi.abi import decode from aiogram import types, Bot from aiogram.utils.keyboard import InlineKeyboardBuilder @@ -83,8 +84,9 @@ class EventBot: bond_id = int(log["topics"][1].hex(), 16) button_url += str(bond_id) elif event_name == "ProposalCreated": - proposal_id = int(log["topics"][1].hex(), 16) - button_url += str(proposal_id) + decoded_data = log.get("data", b"") + proposal_id = decode(['uint256'], decoded_data[:32])[0] + button_url += f"0x{proposal_id:x}" button.add(types.InlineKeyboardButton( text=msgs["button_text"],