Skip to content

Instantly share code, notes, and snippets.

@ptisserand
Created July 22, 2023 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptisserand/fc0b1b2550b10a6a95add389a7522f6d to your computer and use it in GitHub Desktop.
Save ptisserand/fc0b1b2550b10a6a95add389a7522f6d to your computer and use it in GitHub Desktop.
Contract declaration error
$ scarb build
Compiling splitter v0.1.0 (/home/robin/src/rob/blockchain/hackathon/ethglobal/paris/starksplitter/contracts/Scarb.toml)
Finished release target(s) in 1 second
$ starkli declare ./target/dev/splitter_Splitter.sierra.json
Enter keystore password:
Sierra compiler version not specified. Attempting to automatically decide version to use...
Network detected: goerli-1. Using the default compiler version for this network: 2.0.1. Use the --compiler-version flag to choose a different version.
Declaring Cairo 1 class: 0x074ec7517bb332f974add95491a2bcddc11178d9c07db90c3aea6c6d74d0f3db
Compiling Sierra class to CASM with compiler version 2.0.1...
CASM class hash: 0x01d2d191381a09f7cf1077be819ac794dea6c4a71c8d24f83555dfaf0f6f4ff7
Error: code=-32603, message="Internal error: StarknetErrorCode.COMPILATION_FAILED: Compilation failed. Error: Libfunc u256_safe_divmod is not allowed in the libfuncs list '/usr/local/lib/python3.9/site-packages/starkware/starknet/compiler/v1/testnet_libfuncs.json'.
Run with '--allowed-libfuncs-list-name all' to allow all libfuncs.
[package]
name = "splitter"
version = "0.1.0"
[dependencies]
starknet = ">=2.0.1"
[[target.starknet-contract]]
sierra = true
casm = true
allowed-libfuncs-list.name = "experimental"
@ptisserand
Copy link
Author

Scarb version:

$ scarb --version 
scarb 0.5.2 (f4b62adfb 2023-07-11)
cairo: 2.0.2 (https://crates.io/crates/cairo-lang-compiler/2.0.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment