effectai/effect-js

Add powerup and buyram method to sdk or force

djmbritt opened this issue · 0 comments

It would be nice to have the feature to powerup the relayer from within the force itself. instead of having the user navigate to an external webpage.

Here is a pretty good example of this can be done:

[eos-auto-powerup/main.js at master · clar/eos-auto-powerup](https://github.com/clar/eos-auto-powerup/blob/master/main.js)

As can be seen,

  1. the @greymass/eosio-resources package is used in order to calculate the resourceUsage for Cpu and Net
  2. Afterwards a transaction is done to eosio::powerup method in order to powerup the account for the day.

This example can be easily ported for the force in order to be done by users and administrators of the force.


Buy Ram

Here we’ll be able to see how to buy ram, which is not possible with the powerup model.

[2. Transaction Examples](https://eosio.github.io/eosjs2/static/2.-Transaction-Examples.html)

Transaction for buyram