starknet-edu / deploy-cairo1-demo

47 stars 23 forks source link

error when declare #9

Open norbubb opened 1 year ago

norbubb commented 1 year ago
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 commented 1 year ago

I run into this as well

l-henri commented 1 year ago

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

Subbitoooo commented 8 months ago

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 :)