How can this be achieved?

check ( cpu_billable_time < 500 ), " sorry, this code won't let you spend more than 500 µs in billable time, please try again later");

This is aside from the max_transaction_cpu_usage in the json.

From what I've read, this may not be possible, any other suggestions? Otherwise, how can my contract save the amount of billed CPU?

1 Answer 1


there's no way at this moment to achieve what you want: to limit your account to not spend more than 500 µs in billable time.

here's more info related to your question: Getting account CPU usage in smart contract

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.