NEWTON
Asked
5 months ago
7
views
0
I have the following code:
@external
func updateCurrNum{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}(updatedNum : felt):
let (isOwner) = isOwner()
assert isOwner = 1
...
And I am getting this error:
Unexpected '.' after 'main.updateCurrNum.isOwner' which is future.
let (isOwner) = isOwner()
^*****^
What am I doing wrong?
ㅤ This question was originally posted on Triality
0
The problem is that you setting the variable name to the same name as the function. You can change to the following:
@external
func updateCurrNum{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}(updatedNum : felt):
let (ownerBool) = isOwner()
assert ownerBool = 1
...
ㅤ This answer was originally posted on Triality
answered
6 months ago
Cairo Error: Unexpected token Token('LPAR', '('). Expected: identifier.
Cairo: Expected '__main__.Id' to be a struct. Found: 'future'
Cairo Error: Getting Expected expression of type 'felt', got '__main__.getCurrNumber.Return'
Cairo 0.10.0 Error: Cannot unpack return value error
Cairo: What is the difference between let and tempvar?
Cairo: are builtins always needed to be expressed in function signature?
Cairo Error: 'range_check_ptr' cannot be used as an implicit return value. Consider using a 'with' statement.
Can you explain about cancellation (L1 -> L2) in StarkNet (sequencer)?
Which oracle service provider is StarkNet using?
Deploying kakarot evm on starkEx
What resources (Github repos, projects) do you follow about Cairo Language? Why?
How to write a struct in storage?
why does keccak256 replace sha256 in warp?
What are Event Indexers in Cairo lang? What is a StarkNet indexer?