Self-custody trade executor for Forkline — your private key never leaves your repo.
When you place a trade on forkline.xyz, this repo is what actually executes it. Forkline dispatches a workflow_dispatch event to your fork of this repo. GitHub Actions reads your private key from your own GitHub Secrets, signs the on-chain transaction, and reports the result back to Forkline.
Forkline sees the trade request and the final tx hash — nothing else.
forkline.xyz → workflow_dispatch → your fork of forkline-executor
↓
GitHub Actions (your environment)
↓
reads PRIVATE_KEY from your Secrets
↓
RialtoSettlementRouter.exactInputSingle()
(Robinhood Chain · chainId 4663)
↓
on-chain swap confirmed
↓
reports txHash + status → forkline.xyz
All verified on Blockscout.
| Contract | Address |
|---|---|
| RialtoSettlementRouter | 0xE23747d8c04b2101c873282C3d339D65d3d84ef0 |
| RialtoV4StockSwapExecutor | 0x36E90e3aCaddC1aad147dBF7a965F0290103717A |
| USDG (Global Dollar) | 0x2CE3E396E069Ac9FA62046F423267072E06E77af |
| Uniswap V3 SwapRouter (fallback) | 0xE592427A0AEce92De3Edee1F18E0157C05861564 |
RPC endpoint: https://rpc.mainnet.chain.robinhood.com
Fork to your own GitHub account. Set the fork to private — workflow logs contain trade details.
Navigate to your fork → Settings → Secrets and variables → Actions → New repository secret.
| Secret | Value |
|---|---|
PRIVATE_KEY |
Your EOA private key (0x…64 hex chars). Must hold ETH for gas and USDG for buys. |
RPC_URL |
https://rpc.mainnet.chain.robinhood.com |
FORKLINE_API_URL |
https://forkline.xyz |
FORKLINE_BOT_SECRET |
Copy from forkline.xyz → Portfolio → Account → Bot Secret |
Never share
PRIVATE_KEY. GitHub Secrets are encrypted at rest and only exposed inside your own workflow runs. Forkline never requests or receives this value.
Go to forkline.xyz → Portfolio → Account → Executor Repo.
Enter your repo in the format: youruser/forkline-executor
Before trading you need:
- ETH on Robinhood Chain — for gas fees
- USDG — to buy tokenized stocks (Global Dollar, native stablecoin on Robinhood Chain)
Triggered by workflow_dispatch from Forkline API.
Inputs: trade_id, ticker, amount_in, slippage_bps (default: 50 bps)
Steps:
- Calls
RialtoV4StockSwapExecutor.previewOracleMinimum()— Chainlink-backed minimum output - Approves
amount_inUSDG toRialtoSettlementRouter - Calls
exactInputSingle({ tokenIn: USDG, tokenOut: stockToken, ... }) - Waits for on-chain confirmation
- Reports
txHash+status: SUCCESSback to Forkline
Same flow in reverse. Approves stock token, swaps to USDG.
| Ticker | Name | Contract |
|---|---|---|
| AAPL-T | Apple | 0xaF3D76… |
| AMD-T | AMD | 0x86923f… |
| AMZN-T | Amazon | 0x12f190… |
| COIN-T | Coinbase | 0x6330D8… |
| GOOGL-T | Alphabet | 0x2e0847… |
| META-T | Meta | 0xc0D645… |
| MSFT-T | Microsoft | 0xe93237… |
| NFLX-T | Netflix | 0xE0444E… |
| NVDA-T | NVIDIA | 0xd0601C… |
| TSLA-T | Tesla | 0x322F09… |
All tokens are ERC-20, 18 decimals. USDG uses 6 decimals.
Every trade produces a transaction hash viewable on the Robinhood Chain explorer:
https://robinhoodchain.blockscout.com/tx/<txHash>
You can independently verify the swap amounts, token addresses, and your wallet address without relying on Forkline.
Workflow not triggered?
- Verify
FORKLINE_BOT_SECRETmatches the value shown in Forkline → Portfolio → Account - Verify the repo path in Forkline matches exactly (
user/repo, case-sensitive) - Ensure GitHub Actions is enabled on your fork (Settings → Actions → Allow all actions)
Swap reverted?
- Check ETH balance for gas on Robinhood Chain
- Check USDG balance ≥ trade amount for buys
- Try increasing slippage via the Forkline trade UI if markets are volatile
Oracle unavailable?
previewOracleMinimumis a soft dependency. If it reverts, the script proceeds withamountOutMinimum = 0. Rialto's internal price guard still applies.
| What Forkline has | What Forkline never has |
|---|---|
| Your GitHub username | Your private key |
| Your wallet address | Your GitHub token |
| Trade request (ticker, amount) | Access to your GitHub Secrets |
| Final tx hash | Ability to sign transactions |
Your private key exists only inside GitHub Actions' encrypted secret store and your own machines.
MIT