Is it possible to access the CPU usage of a given account from within a smart contract?

For eg. in a smart contract transfer notification, you call get_account_info(N(some_account_name)) which returns a struct object containing {cpu_used, cpu_available, net_used, net_available, ram_used} etc.

  • Do you mean, is it possible to figure out beforehand how much CPU an action in a smart contract will use? – Phillip Hamnett - EOS42 Sep 11 at 7:58
  • No... it's as if you are doing 'cleos get account' but in the smart contract so that cpu, net and ram information for a given account can be available in the smart contract – Jeff Zheng Sep 11 at 8:20

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.