NEWTON
Asked
4 months ago
12
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
4 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?
What is SHARP in Cairo Language?
Can anyone share some articles explaining SNARK/STARK concepts and rollups (Optimism)?
Does anyone know how to print a uint256 in protostar tests?
How do I log/print in Cairo 1.0?
Is there a unsigned_div_rem supporting dividing by 2**128 ?
How to submit a StarkNet contract?
Does Account Abstraction work on Mobile?