NEWTON
Asked
10 months ago
13
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
10 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.
Is anyone experiencing slowness on goerli StarkNet?
How can I read contract memory with starknetjs?
How to use Argent (or any from the main providers) account in the StarkNet.py?
Is there a Cairo equivalent to Keccak256(abi.encode(parameters))?
Why abi of warp compiled contract does not match original solidity abi?
Cairo: How do I iterate through an array of structs?
Cairo error: Unknown identifier 'bitwise_ptr' when using keccak