Rent TRON Energy from PowerSun.vip before deploying smart contracts or sending transactions. Save 20-50% vs burning TRX.
- name: Rent Energy for deployment
uses: Hovsteder/tron-energy-action@v1
with:
target-address: ${{ secrets.DEPLOYER_ADDRESS }}
tx-count: '10'
duration: '30'
api-key: ${{ secrets.POWERSUN_API_KEY }}name: Deploy Contract
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Estimate energy cost
id: estimate
uses: Hovsteder/tron-energy-action@v1
with:
target-address: ${{ secrets.DEPLOYER_ADDRESS }}
tx-count: '1'
tx-type: 'contract_call'
duration: '30'
api-key: ${{ secrets.POWERSUN_API_KEY }}
estimate-only: 'true'
- name: Show estimate
run: |
echo "Energy: ${{ steps.estimate.outputs.energy-amount }}"
echo "Cost: ${{ steps.estimate.outputs.cost-trx }} TRX"
echo "Savings: ${{ steps.estimate.outputs.savings-percent }}%"
- name: Rent energy
id: energy
uses: Hovsteder/tron-energy-action@v1
with:
target-address: ${{ secrets.DEPLOYER_ADDRESS }}
tx-count: '1'
tx-type: 'contract_call'
duration: '30'
api-key: ${{ secrets.POWERSUN_API_KEY }}
max-price-trx: '50'
- name: Deploy contract
run: npx tronbox migrate --network mainnet
env:
PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }}| Input | Required | Default | Description |
|---|---|---|---|
target-address |
Yes | — | TRON address to delegate energy to |
tx-count |
No | 1 |
Number of transactions |
tx-type |
No | trc20_transfer |
Transaction type |
duration |
No | 30 |
Duration in minutes (5-10080) |
api-key |
Yes | — | PowerSun API key (ps_*) |
max-price-trx |
No | — | Max acceptable price in TRX |
estimate-only |
No | false |
Only estimate, don't buy |
| Output | Description |
|---|---|
order-id |
Order UUID |
status |
Order status |
cost-trx |
Total cost in TRX |
energy-amount |
Energy amount rented |
savings-percent |
Savings vs TRX burn (%) |
- Visit powersun.vip
- Connect your TRON wallet
- Copy your API key from the dashboard
- Add it as a GitHub Secret:
POWERSUN_API_KEY
- Platform: powersun.vip
- API Docs: powersun.vip/api-docs
- MCP Server: powersun.vip/mcp
MIT