You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I declare cairo 1.0 contract on starknet mainnet, meet this error:
Sending the transaction with max_fee: 0.000063 ETH (63158123495606 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 "/home/chain/workrust/starknet-contract/venv/lib/python3.9/site-packages/services/external_api/client.py", line 187, in _send_request
return await self._parse_response(
File "/home/chain/workrust/starknet-contract/venv/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"}
[13:42]
Hi @icodezjb , did you use "scarb build" command to generate your sirrea middle file first? If so, you can then use "starkli declare" command to declare your the sirrea middle file to generate the class hash, and finally, you can use "starkli deploy" to deploy your contract on the mainnet.
When I declare cairo 1.0 contract on starknet mainnet, meet this error:
Sending the transaction with max_fee: 0.000063 ETH (63158123495606 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 "/home/chain/workrust/starknet-contract/venv/lib/python3.9/site-packages/services/external_api/client.py", line 187, in _send_request return await self._parse_response( File "/home/chain/workrust/starknet-contract/venv/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"} [13:42]
The text was updated successfully, but these errors were encountered: