NEWTON
Asked
9 months ago
20
views
0
How can I resolve this issue?
I'm trying to prove that the left uint is smaller than the right uint using this function:
func main(syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr):
let zero = Uint256(0, 0)
let one = Uint256(1, 0)
let (result) = uint256_signed_lt(zero, one)
end
ㅤ This question was originally posted on Triality
0
You can solve it one of the following two ways:
main{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}()
with range_check_ptr:
let (result) = uint256_signed_lt(zero, one)
end
The first one is the most logical answer as it is less management and less code to resolve and can be reused in any other functions that need implicit range_check_ptr
ㅤ This answer was originally posted on Triality
answered
9 months ago
Cairo error "Expected expression of type 'starkware.cairo.common.uint256.Uint256' to have an address."
Cairo: How to reassign Uint256 in a conditional
Fixed Point pow operation error
How do you optimize gas in Cairo with Uint256/felt?
How to import uint256 in Cairo?
Is uint256 math operators like uint256_le safe? Why do I need to use uint256_check?
How can I send a Uint256 amount of ERC20 tokens from L1 to starknet? And how should I build my payload for "sendMessageToL2" to match the Uint256 format of Cairo?
Is there a threshold of optimum transaction speed/cost in L2s?
Any NFT marketplace has launched on starknet L2?
How can I connect a StarkNet account using starknetjs?
How to select the network my Pathfinder node runs on?
Where can i get test tokens in StarkNet?
Why does it take more time to make swap on starknet than other L2 blockchain?
StarkNet error while deploying: IndexError: list assignment index out of range. Can anyone help?