Skip to content
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

toncenter client bull shit #27

Open
betepookk opened this issue Dec 28, 2024 · 10 comments
Open

toncenter client bull shit #27

betepookk opened this issue Dec 28, 2024 · 10 comments

Comments

@betepookk
Copy link

INVALID_BAG_OF_CELLS: bodybag of cells is expected to have exactly one root
image

@nessshon
Copy link
Owner

@betepookk I need more information about a transaction or action.

@betepookk
Copy link
Author

@betepookk I need more information about a transaction or action.

roughly speaking, the problem is in toncenter.py, namely in line number 63, try right now to send any transaction using toncenter api and a regular wallet for example wallet v4r2 format (I don't know honestly if there is a difference between them) you will get an error and the whole thing is that in version 0.0.2 you changed the method of boc to base64 conversion from ‘base64.b64encode(bytes.fromhex(boc)).decode()’ to ‘boc_to_base64_string(boc)’. I apologise for the shit text, I use a translator.

@betepookk
Copy link
Author

at least at the moment I changed this line in my library to this ‘base64.b64encode(bytes.fromhex(boc)).decode()’ and the transaction was sent.

@nessshon
Copy link
Owner

@betepookk а какая версия tonutils ? в 0.1.8 вроде пофиксил я.

@betepookk
Copy link
Author

о как xd, все так же в 0.1.8

@nessshon
Copy link
Owner

nessshon commented Dec 28, 2024

а можешь проверить этот вариант ?

def boc_to_base64_string(boc: Union[str, bytes]) -> str:
    if isinstance(boc, str):
        boc = Cell.one_from_boc(boc).to_boc()

    if not isinstance(boc, bytes):
        raise TypeError("Expected boc to be bytes, but got something else.")

    return base64.urlsafe_b64encode(boc).decode()

@betepookk
Copy link
Author

betepookk commented Dec 28, 2024

image
image
image

@betepookk
Copy link
Author

пару раз запустил 3 разных ошибки выдало

@betepookk
Copy link
Author

могу тебе в тгшку написать там продолжим если что

@nessshon
Copy link
Owner

@betepookk го https://t.me/nessshon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@nessshon @betepookk and others