Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

error when declare #9

Open
norbubb opened this issue Mar 31, 2023 · 3 comments
Open

error when declare #9

norbubb opened this issue Mar 31, 2023 · 3 comments

Comments

@norbubb
Copy link

norbubb commented Mar 31, 2023

Sending the transaction with max_fee: 0.000030 ETH (29795131768187 WEI).
Got BadRequest while trying to access https://alpha-mainnet.starknet.io/gateway/add_transaction. Status code: 500; text: {"code": "StarknetErrorCode.COMPILATION_FAILED", "message": "Compilation failed. Error: Libfunc alloc_local is not allowed in the libfuncs list '/app/src/starkware/starknet/services/gateway/starknet_gateway_venv-site/starkware/starknet/compiler/v1/mainnet_libfuncs.json'.\n Run with '--allowed-libfuncs-list-name experimental_v0.1.0' to allow all libfuncs.\n"}.
Traceback (most recent call last):
  File "/root/.pyenv/versions/python3.9/lib/python3.9/site-packages/services/external_api/client.py", line 187, in _send_request
    return await self._parse_response(
  File "/root/.pyenv/versions/python3.9/lib/python3.9/site-packages/services/external_api/client.py", line 231, in _parse_response
    raise BadRequest(status_code=response.status, text=text)
services.external_api.client.BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.COMPILATION_FAILED", "message": "Compilation failed. Error: Libfunc alloc_local is not allowed in the libfuncs list '/app/src/starkware/starknet/services/gateway/starknet_gateway_venv-site/starkware/starknet/compiler/v1/mainnet_libfuncs.json'.\n Run with '--allowed-libfuncs-list-name experimental_v0.1.0' to allow all libfuncs.\n"}
Error: BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.COMPILATION_FAILED", "message": "Compilation failed. Error: Libfunc alloc_local is not allowed in the libfuncs list '/app/src/starkware/starknet/services/gateway/starknet_gateway_venv-site/starkware/starknet/compiler/v1/mainnet_libfuncs.json'.\n Run with '--allowed-libfuncs-list-name experimental_v0.1.0' to allow all libfuncs.\n"}
@LvisWang
Copy link

I run into this as well

@l-henri
Copy link
Contributor

l-henri commented Apr 7, 2023

Hello,
Can you confirm which branch / height have you checked out in the Cairo repo?
Thanks,

@Subbitoooo
Copy link

Hello guys, I will try to suggest you something that Could be helpful to solve thi Problem. You should try to modify the transaction command by adding the flag --allowed-libfuncs-list-name experimental_v0.1.0 to permit all libfuncs during compilation. This adjustment should address the compilation failure issue, allowing you to proceed with sending the transaction on the Starknet network. I'm pretty sure it will work. Have a nice day :)

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

No branches or pull requests

4 participants