https://github.com/ethersphere/node-funder
tool to fund bee nodes
https://github.com/ethersphere/node-funder
bee swarm
Last synced: about 1 year ago
JSON representation
tool to fund bee nodes
- Host: GitHub
- URL: https://github.com/ethersphere/node-funder
- Owner: ethersphere
- License: bsd-3-clause
- Created: 2022-11-15T14:55:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T12:16:24.000Z (over 1 year ago)
- Last Synced: 2025-04-07T20:21:23.000Z (about 1 year ago)
- Topics: bee, swarm
- Language: Go
- Homepage:
- Size: 142 KB
- Stars: 2
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-funder
[](https://github.com/ethersphere/node-funder/actions/workflows/test.yml)
[](https://github.com/ethersphere/node-funder/actions/workflows/lint.yml)
[](./.github/testcoverage.yml)
Node funder is tool to fund (top up) bee nodes up to the specified amount. It can fund all nodes in k8s namespace or it can fund only specified addresses.
## Arguments
### Funding node
- `chainNodeEndpoint` - RPC URL of blockchain node (Infura API URL)
- `walletKey` - private key of wallet which will be used to fund nodes (hex encoded string value).
- specify one argument:
- `namespace` - the k8s namespace to fund all nodes in this namespace, or
- `addresses` - comma separated list of wallet addresses (hex encoded string value) to fund wallets directly
- `minSwarm` - min amount of Swarm tokens node should have (on mainnet this is xBZZ). Node is not funded if it already has more then specified.
- `minNative` - min amount of blockchain native tokens node should have (on mainnet this is xDAI). Node is not funded if it already has more then specified.
### Staking node
- `namespace` - the k8s namespace to stake all nodes in this namespace
- `minSwarm` - min amount of Swarm tokens node should have staked
## Command examples
### Fund nodes in k8s namespace
```console
## Fund nodes in k8s namespace to have at least 10 Swarm and 0.5 native tokens
go run ./cmd fund --chainNodeEndpoint={...} --walletKey={...} --namespace={...} --minSwarm=10 --minNative=0.5
## example
## go run ./cmd fund --chainNodeEndpoint="wss://goerli.infura.io/ws/v3/apikey" --walletKey="aaabbccddeeffdfd391e07b86b63ff7558ad711fed058461d0e4ceaae3cbebf16a" --namespace="testnet" --minSwarm=10 --minNative=0.5
```
### Fund addresses
```console
## Fund wallet addresses to have at least 10 Swarm and 0.5 native tokens
go run ./cmd fund --chainNodeEndpoint={...} --walletKey={...} --addresses={...} --minSwarm=10 --minNative=0.5
## example
## go run ./cmd fund --chainNodeEndpoint="wss://goerli.infura.io/ws/v3/apikey" --walletKey="aaabbccddeeffdfd391e07b86b63ff7558ad711fed058461d0e4ceaae3cbebf16a" --addresses="0x4C4E453E72aF9939A27cac5a09ba583d72c4DfF0,0x4C4E453E72aF9939A27cac5a09ba583d72c4DfF0" --minSwarm=10 --minNative=0.5
```
### Staking namespace
```console
## Stake all nodes to have at least 10 Swarm tokens staked
go run ./cmd stake --namespace={...} --minSwarm=10
## example
## go run ./cmd stake --namespace="testnet" --minSwarm=10
```