E0040: With requires effect
You used the with statement naming a function that isn't an effect.
Example
fn an_ordinary_function() { ... }
// later...
try { ... }
with an_ordinary_function() { ... }
How to fix
Only use with statements with effects:
abi MyAbi {
effect an_effect();
}
// later...
try { ... }
with an_effect() { ... }