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

Error when Declare #12

Open
Subbitoooo opened this issue Jan 9, 2024 · 0 comments
Open

Error when Declare #12

Subbitoooo opened this issue Jan 9, 2024 · 0 comments

Comments

@Subbitoooo
Copy link

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"}.
Solution :
To resolve this, 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.
Hope i was helpful ;)

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

1 participant