NEWTON
Asked
4 months ago
4
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
4 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
How do I connect my DAPP to a Starknet node using starknetjs?
how I could read a felt* from ap in Cairo lang?
How to modify keccak.cairo and/or packed_keccak.cairo to compute a 512bits keccak hash instead of 256 bits?
anyone know how to disconnect the connected wallet on the frontend with starknetjs or another way?
How can I verify a contract on starkscan or voyager after deploying the contract
What the etherscan equivalent for starknet is ?