NEWTON
Asked
10 months ago
12
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
10 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
How do I connect my DAPP to Starknet-devnet using starknetjs?
Does Kakarot zkEVM have a token?
When will Kakarot zkEVM launch on mainnet?
Is there a javascript version of StarkEx playground?
How can I change solc compiler version in warp?
How can I read contract memory with starknetjs?
Do you know if I can use a Braavos account as a multisig wallet?