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
--profileis the complete path of the profile you want to use, where gas tank is defined--master-addressis the account who was used at setup--master-pkis the private key of the master-address account--fundis the amount of STRK to transfer to the gas tank, it'll then refill the relayers (optional - default: 0)--swapif true, the rebalancing will also swapsupported_tokensback 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 --swapOutput 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...
NoteYou can use any master account you want here. It just need to have at least a balance >=
--fundto be able to refill the gas tank.
Updated 4 months ago