NEWTON
Asked
6 months ago
8
views
0
Say I am calling the following function test. Why can I call with either of these function signatures and get the same result?
func test{syscall_ptr : felt*}():
or
func test{syscall_ptr : felt*, range_check_ptr}():
ㅤ This question was originally posted on Triality
0
From the docs:
"Builtins are predefined optimized low-level execution units which are added to the Cairo CPU board to perform predefined computations which are expensive to perform in vanilla Cairo (e.g., range-checks, Pedersen hash, ECDSA, …)."
https://www.cairo-lang.org/docs/how_cairo_works/builtins.html?highlight=range_check_ptr
So if you have access to a builtin and do not need to redefine it, you do not need to explicitly pass it in to a function
ㅤ This answer was originally posted on Triality
answered
6 months ago
Cairo: Getting function selector
Cairo Error calling function: Expected 'function_name' to be a struct. Found: 'function'.
ApeWorX: How do I call an account while trying to test a function?
Where can i get test tokens in StarkNet?
How can I get ETH for the test net in StarkNet?
Expect function call to fail in cairo?
Cairo: How do write a log function in Cairo
Nethermind's warp error: JavaScript heap out of memory
Is there any blockchain project contract supporting web2 scripts executable on VIa EVM?
Have there been any security issues reported on the Cairo code generated from warp so far?
A switch statement in Cairo lang to set two distinct values
How can I read contract memory with starknetjs?
How expensive are bitwise operations (and/or/xor) vs arithmetic in Cairo?
ApeWorX: How do I fund newly created accounts from the ape console?