Skip to content

Instantly share code, notes, and snippets.

@arno01
Created September 2, 2023 17:24
Show Gist options
  • Save arno01/2334ae116105befc46ede4d3922992e1 to your computer and use it in GitHub Desktop.
Save arno01/2334ae116105befc46ede4d3922992e1 to your computer and use it in GitHub Desktop.

I've updated the Akash CLI Booster tool so it can display all the balances now, including the IBC ones, converting their long ibc/<HEX> name into the short, human-readable base_name. As well as one can check the balances for the specific base_denom (e.g. uausdc or uakt).

Repo: https://github.com/arno01/akash-tools

Example

tested in sandbox-01

$ akash_balance 
uausdc: 355.000351
uakt: 123.423945

$ akash_balance uausdc
355.000351

$ akash_balance uakt
123.423945

Have also updated its akash_deploy function so that it allows passing the args, which is handy when deploying "take pay" deployments (where you are paying with the other than uakt aka AKT currency, such as stablecoin - uausdc aka aUSDC).

Example: deposit aUSDC in Akash sandbox-01

  • SDL
  placement:
    akash:
      pricing:
        supermario:
          denom: ibc/12C6A0C374171B595A0A9E18B83FA09D295FB1F2D8C6DAA3AC28683471752D84
          amount: 1.5
  • akash_deploy
akash_deploy deployA.yml --deposit=5000000ibc/12C6A0C374171B595A0A9E18B83FA09D295FB1F2D8C6DAA3AC28683471752D84

test results

Provider calculated the same target-pricing, but in different currencies (AKT vs aUSDC) as expected:

  • uausdc:
[709398--1]$ akash_accept 
    rate    monthly    usd    dseq/gseq/oseq    provider                    host
0>    5.88    2.52    $2.46    709398/1/1    akash1rk090a6mq9gvm0h6ljf8kz8mrxglwwxsk4srxh    provider.provider-02.sandbox-01.aksh.pw:8443
1>    5.88    2.52    $2.46    709398/1/1    akash1wlry5lt90vf3f5ntyv5n95t63uh9x8udh8chm0    provider.cypherpunklabs.uk:8443    
  • uakt:
[709429--1]$ akash_accept 
    rate    monthly    usd    dseq/gseq/oseq    provider                    host
0>    5.75    2.46    $2.46    709429/1/1    akash1rk090a6mq9gvm0h6ljf8kz8mrxglwwxsk4srxh    provider.provider-02.sandbox-01.aksh.pw:8443
1>    5.75    2.46    $2.46    709429/1/1    akash1wlry5lt90vf3f5ntyv5n95t63uh9x8udh8chm0    provider.cypherpunklabs.uk:8443    
  • when closing aUSDC-based deployment:
[709595-1-1]$ akash_close
INFO: Broadcasting 'provider-services deployment close -y' transaction...
INFO: Waiting for the TX 2B35C0709BFCB5EF8E4AE46FCA3B3FD8234228FC98CD329AF06C920A02FA41D3 to get processed by the Akash network
INFO: Success
709595/1 deployment has been successfully closed.
INFO: Total 22.981608000000000000 uausdc or $0.0000229
  • when closing AKT-based deployment:
[709609-1-1]$ akash_close
INFO: Broadcasting 'provider-services deployment close -y' transaction...
INFO: Waiting for the TX DDBBCD4BB113B7386A7C73397DDBBE4F69D2F14E178606C44F3B707364662EB4 to get processed by the Akash network
INFO: Success
709609/1 deployment has been successfully closed.
INFO: Total 17.642280000000000000 uakt or $0.0000172

Have also added a provider_info.sh script that gives quick and nice provider repots on what's they are running and the amount of pending / available resources per worker node:

$ provider_info.sh provider.hurricane.akash.pub
type       cpu     gpu  ram                 ephemeral           persistent
used       30.9    0    55.116281249560416  302.8818359375      4
pending    2       0    4                   80                  0
available  33.025  1    107.31365611311048  426.57433027774096  3372.1222735904157
node       33.025  1    107.31365611311048  426.57433027774096  N/A
$ provider_info.sh provider.europlots.com
type       cpu      gpu  ram                 ephemeral           persistent
used       161.05   0    364.90471215732396  4327.61628124956    1049
pending    5.5      0    34.5                204                 0
available  463.9    0    1003.6888659428805  13526.818668362685  8807.832932417281
node       240.815  0    446.221853017807    6168.09386989288    N/A
node       110.065  0    275.510404586792    3843.1173073928803  N/A
node       103.515  0    274.7904000710696   3483.46001051832    N/A
node       9.505    0    7.166208267211914   32.147480558604     N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment