EOSCommunity.org Forums

Call PowerUP via CLI

How can I purchse resources using the PowerUP model via CLI?

I see there are net_frac and cpu_frac params, which I don’t know how to calculate. Is there any easy way to send a tx to say “I want to pay 0.0001 for CPU and 0.0001 for NET to run my next transaction?”

I’m not sure there’s an easy way to calculate those values from the using cleos. You’ll most likely need some sort of supplemental library to do the calculations before performing those actions on the command line.

We created a javascript library to help with those calculations, which I believe could be used on the command line in conjunction with cleos or another tool - but none are directly integrated and would likely require wrapping it all in some sort of shell script. If you were to perform the entire transaction in Javascript (creating, calculating, and signing in a single js file), that’d likely work as well.

(I know I responded to you on Telegram, responding here as well for SEO purposes)

1 Like