NEWTON
Asked
5 months ago
5
views
0
In solidity I can add an error message as the 2nd argument to require, like: require(<some_condition>, "My error message");
Is there an equivalent way to do this in a starknet contract? Like for assert some_var = 0
ㅤ This question was originally posted on Triality
0
You can wrap the assertion in with_attr
, for example:
with_attr error_message("My error message"):
assert some_var = 0
end
ㅤ This answer was originally posted on Triality
answered
6 months ago
Cairo: How do I initialize an array in cairo
Cairo: How do I find the current contract's address?
Can you explain about cancellation (L1 -> L2) in StarkNet (sequencer)?
ApeWorX: Why am I getting an "account __execute__" error message?
Cairo: How to return true from a function?
ApeWorX: Why am I getting the error message "ArgumentsLengthError"?
Cairo: How do write a log function in Cairo
My ABIs will be same right? In UI I am assuming I wont have to make any changes
How to make math operation with Field Elements (felts) in Cairo lang?
Trying to deploy contract with Argent guide but got error Unitialized Contract
How to deploy a contract through starknet.py?
How to use multicall with protostar 0.9.0?
Any idea what this could be caused by?
How can I get ETH for the test net in StarkNet?