Documentation

Relayers rebalancing

The relayers rebalancing command let you quickly trigger a rebalance of relayers and/or refill the gas tank in STRK.

Rebalancing is done automatically, this command should be mainly used to refill the gas tank in STRK tokens. It could also be useful in case of automatic rebalancing issues.

Command

  • --profile is the complete path of the profile you want to use, where gas tank is defined
  • --master-address is the account who was used at setup
  • --master-pk is the private key of the master-address account
  • --fund is the amount of STRK to transfer to the gas tank, it'll then refill the relayers (optional - default: 0)
  • --swap if true, the rebalancing will also swap supported_tokens back to STRK during the process (optional - default: false)
cargo run --bin paymaster-cli relayers-rebalance --master-address=0xdead --master-pk=0xbeef --profile=path/to/my-profile.json --fund=100 --swap
Output example

Rebalancing relayers for profile: path/to/my-profile.json
Using chain-id: SN_SEPOLIA
Using RPC URL: https://starknet-sepolia.public.blastapi.io/rpc/v0_8
Profile path: path/to/my-profile.json
Successfully updated 2/2 relayer balances
At least one relayer below trigger balance, performing rebalance


Do you want to proceed with the rebalance? This will transfer an additional 30 STRK tokens to the gas tank. (y/N): y


Rebalancing transaction executed successfully!
Transaction hash: 0x0...

📘

Note

You can use any master account you want here. It just need to have at least a balance >= --fund to be able to refill the gas tank.