<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Onaopemipo Oluborode</title>
    <description>The latest articles on DEV Community by Onaopemipo Oluborode (@borodedamie).</description>
    <link>https://dev.to/borodedamie</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4267224%2F0d105497-56a5-4e9e-be60-e6f17a4a2572.png</url>
      <title>DEV Community: Onaopemipo Oluborode</title>
      <link>https://dev.to/borodedamie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/borodedamie"/>
    <language>en</language>
    <item>
      <title>A GitHub bot that buys what your AI coding assistant doesn't know about your dependencies</title>
      <dc:creator>Onaopemipo Oluborode</dc:creator>
      <pubDate>Thu, 26 Nov 2026 18:13:23 +0000</pubDate>
      <link>https://dev.to/borodedamie/a-github-bot-that-buys-what-your-ai-coding-assistant-doesnt-know-about-your-dependencies-3jd7</link>
      <guid>https://dev.to/borodedamie/a-github-bot-that-buys-what-your-ai-coding-assistant-doesnt-know-about-your-dependencies-3jd7</guid>
      <description>&lt;p&gt;AI coding assistants learn from data that stops at a date, their &lt;em&gt;training cutoff&lt;/em&gt;. When one of your dependencies ships a new major version after that date, the assistant can't know what changed, so it guesses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Telegraph PR Agent&lt;/strong&gt; is a GitHub Action that fills that gap. It checks your repository's dependencies, and for every update released after the cutoff it buys a short, sourced answer to &lt;em&gt;"what changed between your version and the new one?"&lt;/em&gt; Then it opens a pull request with the breaking changes, how to migrate, a quote and a link for each, and the lines in your code that are affected. You, or your coding assistant, use that PR to do the upgrade.&lt;/p&gt;

&lt;p&gt;This guide sets it up on a GitHub repository in about 15 minutes. &lt;strong&gt;Everything runs on a test network with free test money&lt;/strong&gt;: nothing here costs real money.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclosure.&lt;/strong&gt; This is our team's entry in the Telegraph Hackathon Season II. Our team runs both the bot and the answer service it buys from (miner 7314), so our own purchases are tests, not demand. The code is open: [github.com/borodedamie/telegraph-pr-agent (&lt;a href="https://github.com/borodedamie/telegraph-pr-agent" rel="noopener noreferrer"&gt;https://github.com/borodedamie/telegraph-pr-agent&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  What works today
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Works with:&lt;/strong&gt; a single JavaScript/TypeScript project with &lt;code&gt;package-lock.json&lt;/code&gt;, &lt;code&gt;pnpm-lock.yaml&lt;/code&gt;, &lt;code&gt;yarn.lock&lt;/code&gt; or &lt;code&gt;bun.lock&lt;/code&gt; in its root, whose dependencies all come from the npm registry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Doesn't work with (yet):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;monorepos (workspaces);&lt;/li&gt;
&lt;li&gt;projects with any dependency from GitHub, a URL or a local folder (&lt;code&gt;github:…&lt;/code&gt;, &lt;code&gt;git+…&lt;/code&gt;, &lt;code&gt;file:…&lt;/code&gt;): the bot then skips every package, not just those;&lt;/li&gt;
&lt;li&gt;private repositories;&lt;/li&gt;
&lt;li&gt;C/C++ (Meson, CMake), Rust, Go.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Python is limited:&lt;/strong&gt; only exact &lt;code&gt;==&lt;/code&gt; pins in &lt;code&gt;requirements*.txt&lt;/code&gt; are read, and Python answers come from other services, which may answer badly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not sure? Start with our test project&lt;/strong&gt;, which is known to work (step A1).&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  What is Telegraph? (click to expand)
  &lt;p&gt;&lt;a href="https://docs.telegraphprotocol.com" rel="noopener noreferrer"&gt;Telegraph&lt;/a&gt; is a marketplace where programs buy answers from other programs and pay per answer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Miners&lt;/strong&gt; are the sellers: web services that each answer one kind of question. Our team runs miner &lt;strong&gt;7314&lt;/strong&gt;, which answers "what changed in npm package X between version A and B", with a quote and a source link for every change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Buyers&lt;/strong&gt; are programs like our bot. They send a question to Telegraph, pay for it, and get the answer with a receipt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payment&lt;/strong&gt; is in USDC, a dollar stablecoin. During the hackathon everything runs on Ethereum's &lt;strong&gt;Sepolia test network&lt;/strong&gt; with free test USDC, so no real money is involved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Escrow&lt;/strong&gt; is a pre-paid balance with Telegraph. You deposit once; each answer is deducted from it, with no blockchain transaction per answer.&lt;/li&gt;
&lt;li&gt;Telegraph keeps 2% of each payment and passes the rest to the miner. Miners are scored on test questions and ranked.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it runs.&lt;/strong&gt; No server. You add two files to a GitHub repository, and GitHub runs them on its own machines (GitHub Actions). The bot pays about 0.02 test USDC per answer to Telegraph, gets the answer and a receipt from miner 7314, and opens a pull request in your repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;your repository ──▶ GitHub runs the bot ──▶ bot pays 0.02 test USDC to Telegraph ──▶ miner 7314
                                       ◀── answer + receipt ─────────────────────────────┘
                    bot opens a pull request in your repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;At the end you'll have:&lt;/strong&gt; pull requests in your repository, one per dependency update, and a web page showing what was bought and what it cost.&lt;/p&gt;

&lt;p&gt;The guide has four parts: &lt;strong&gt;A&lt;/strong&gt; the repository, &lt;strong&gt;B&lt;/strong&gt; a test wallet with free test money, &lt;strong&gt;C&lt;/strong&gt; connecting the bot, &lt;strong&gt;D&lt;/strong&gt; running it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part A: the repository (5 min, all in the browser)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A1. Fork a project.&lt;/strong&gt; Use a fork, not a repository you care about: the bot opens pull requests and needs a permission (A3).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Easiest, known to work:&lt;/strong&gt; fork
&lt;a href="https://github.com/borodedamie/telegraph-fix-fixture" rel="noopener noreferrer"&gt;borodedamie/telegraph-fix-fixture&lt;/a&gt;, a small TypeScript project on zod 3 with a real breaking upgrade to zod 4. It already has both workflow files: in C3, open &lt;code&gt;.github/workflows/telegraph-dependency-updates.yml&lt;/code&gt; in your fork, click the pencil (edit), replace its content with the C3 file and commit; skip C4.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your own choice:&lt;/strong&gt; any public project that fits &lt;strong&gt;Works with&lt;/strong&gt; above and hasn't updated its dependencies in a while.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Click &lt;strong&gt;Fork&lt;/strong&gt; on its GitHub page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A2. Turn on Actions in the fork.&lt;/strong&gt; In your fork open the &lt;strong&gt;Actions&lt;/strong&gt; tab and click &lt;strong&gt;I understand my workflows, go ahead and enable them&lt;/strong&gt;. GitHub turns Actions off in new forks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A3. Let Actions open pull requests.&lt;/strong&gt; In your fork: &lt;strong&gt;Settings → Actions → General&lt;/strong&gt;, scroll to &lt;strong&gt;Workflow permissions&lt;/strong&gt;, tick &lt;strong&gt;Allow GitHub Actions to create and approve pull requests&lt;/strong&gt;, click&lt;br&gt;
&lt;strong&gt;Save&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why: the bot's whole output is pull requests, and GitHub blocks automation from opening them by default.&lt;/li&gt;
&lt;li&gt;Be aware: this checkbox applies to every workflow in the repository and also allows approving PRs. Our bot only opens them; it never approves or merges. That's why we use a fork.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Part B: a test wallet with free test money
&lt;/h2&gt;

&lt;p&gt;The bot pays for each answer from a wallet. You make a new one just for this, put free test tokens in it, and deposit 0.20 test USDC with Telegraph. At the end you have the wallet's &lt;strong&gt;private key&lt;/strong&gt;, which you give to GitHub in Part C.&lt;/p&gt;

&lt;p&gt;Pick one way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Option 1, the terminal&lt;/strong&gt; (5–10 min), if you're comfortable with a command line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Option 2, the browser&lt;/strong&gt; (15 min), with MetaMask and Remix, no terminal.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Option 1: in a terminal
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;B1. Install Foundry&lt;/strong&gt; (the &lt;code&gt;cast&lt;/code&gt; command):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -L https://foundry.paradigm.xyz &lt;span class="o"&gt;|&lt;/span&gt; bash
foundryup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;B2. Create the wallet.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cast wallet new
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It prints an &lt;strong&gt;Address&lt;/strong&gt; and a &lt;strong&gt;Private key&lt;/strong&gt;. Keep both. Then put them in your terminal session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ADDRESS&lt;/span&gt;&lt;span class="o"&gt;=&amp;lt;&lt;/span&gt;the Address&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;KEY&lt;/span&gt;&lt;span class="o"&gt;=&amp;lt;&lt;/span&gt;the Private key&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This is a throwaway test wallet, so passing the key with &lt;code&gt;--private-key&lt;/code&gt; is fine here. Never do&lt;br&gt;
this with a real key.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;B3. Get test ETH&lt;/strong&gt; (for transaction fees). Open the&lt;br&gt;
&lt;a href="https://cloud.google.com/application/web3/faucet/ethereum/sepolia" rel="noopener noreferrer"&gt;Google Cloud Sepolia faucet&lt;/a&gt;,&lt;br&gt;
paste your Address, request. It's free. Check it arrived (a minute or so) before going on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cast balance &lt;span class="nv"&gt;$ADDRESS&lt;/span&gt; --ether --rpc-url https://ethereum-sepolia-rpc.publicnode.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;B4. Get 1 test USDC.&lt;/strong&gt; The test token lets anyone mint it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cast send 0xcc194e1a843B658526D0D5C431f670028582Ae17 &lt;span class="s2"&gt;"mint(address,uint256)"&lt;/span&gt; &lt;span class="nv"&gt;$ADDRESS&lt;/span&gt; 1000000 \
  --rpc-url https://ethereum-sepolia-rpc.publicnode.com --private-key &lt;span class="nv"&gt;$KEY&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check: this should print &lt;code&gt;1000000&lt;/code&gt; (1 USDC; USDC counts in millionths):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cast call 0xcc194e1a843B658526D0D5C431f670028582Ae17 &lt;span class="s2"&gt;"balanceOf(address)(uint256)"&lt;/span&gt; &lt;span class="nv"&gt;$ADDRESS&lt;/span&gt; \
  --rpc-url https://ethereum-sepolia-rpc.publicnode.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;B5. Put 0.20 USDC into Telegraph's payment account&lt;/strong&gt; (about 10 answers). Run these two, one after&lt;br&gt;
the other:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cast send 0xcc194e1a843B658526D0D5C431f670028582Ae17 &lt;span class="s2"&gt;"approve(address,uint256)"&lt;/span&gt; \
  0x72a70e949362670Bf8bceAd24eFC5b8f950aa08b 200000 \
  --rpc-url https://ethereum-sepolia-rpc.publicnode.com --private-key &lt;span class="nv"&gt;$KEY&lt;/span&gt;
cast send 0x72a70e949362670Bf8bceAd24eFC5b8f950aa08b &lt;span class="s2"&gt;"depositUSDC(uint256)"&lt;/span&gt; 200000 \
  --rpc-url https://ethereum-sepolia-rpc.publicnode.com --private-key &lt;span class="nv"&gt;$KEY&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the second one fails with "insufficient allowance", wait 10 seconds and run it again.&lt;/p&gt;

&lt;p&gt;Check: open &lt;code&gt;https://devnode.telegraphprotocol.com/v1/ledger/account/&amp;lt;your Address&amp;gt;&lt;/code&gt;. &lt;code&gt;available&lt;/code&gt;&lt;br&gt;
should be &lt;code&gt;200000&lt;/code&gt;, which is 0.20 USDC.&lt;/p&gt;

&lt;p&gt;Your private key for Part C is the one from B2.&lt;/p&gt;
&lt;h3&gt;
  
  
  Option 2: in the browser (MetaMask and Remix)
&lt;/h3&gt;

&lt;p&gt;Tested end to end on 26 Nov 2026 with the MetaMask browser extension and Remix 2.6.17. These apps change their screens often: if a button has moved or been renamed, look for the nearest match.&lt;/p&gt;

&lt;p&gt;You use two free tools in your web browser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MetaMask&lt;/strong&gt; is a wallet. It holds your test account and asks you to approve every transaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remix&lt;/strong&gt; is a website for talking to blockchain contracts. You use it to press three buttons:
get test USDC, allow Telegraph to take some of it, and put it in.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use a computer (Chrome, Brave, Firefox or Edge). The MetaMask phone app is fine for W1 to W3, but Remix needs the browser extension.&lt;/p&gt;

&lt;p&gt;Two rules for the whole of this option:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Everything happens on Sepolia&lt;/strong&gt;, the test network. If Remix or MetaMask ever says &lt;strong&gt;Main&lt;/strong&gt;, &lt;strong&gt;Mainnet&lt;/strong&gt; or &lt;strong&gt;Ethereum&lt;/strong&gt; instead of Sepolia, stop and switch back (W2). Main uses real money.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never click Remix's big Deploy button, and leave Value at 0.&lt;/strong&gt; You only use contracts that already exist.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;W1. Install MetaMask and make a test account.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the extension from &lt;a href="https://metamask.io" rel="noopener noreferrer"&gt;metamask.io&lt;/a&gt; and follow its set-up. Write the recovery phrase down somewhere safe.&lt;/li&gt;
&lt;li&gt;Already use MetaMask? Make a separate account just for this: open the account list at the top and click &lt;strong&gt;Add account&lt;/strong&gt;. Not &lt;strong&gt;Add wallet&lt;/strong&gt;, which is for importing an existing one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk00ym16wuirlnx6rcth8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk00ym16wuirlnx6rcth8.png" alt="MetaMask account list with the Add account button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Never use an account that holds anything real: in W7 you give this account's key to GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;W2. Switch to the Sepolia test network.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open MetaMask's network list (&lt;strong&gt;Manage networks&lt;/strong&gt;) and turn on &lt;strong&gt;Show test networks&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Sepolia&lt;/strong&gt; to switch to it. It's already set up: don't edit or save its settings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fycfjjulyy2id7mccjbes.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fycfjjulyy2id7mccjbes.png" alt="Manage networks with Show test networks turned on and Sepolia listed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;W3. Get free test ETH.&lt;/strong&gt; The three transactions below each cost a tiny fee in test ETH.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy your account's address: click the &lt;code&gt;0x…&lt;/code&gt; address under the account name.&lt;/li&gt;
&lt;li&gt;Open the &lt;a href="https://cloud.google.com/application/web3/faucet/ethereum/sepolia" rel="noopener noreferrer"&gt;Google Cloud Sepolia faucet&lt;/a&gt;, choose &lt;strong&gt;Ethereum Sepolia&lt;/strong&gt;, paste the address and click to receive. You may need to sign in to Google.&lt;/li&gt;
&lt;li&gt;Wait a minute until MetaMask shows SepoliaETH (the faucet gives 0.05; you need about 0.002).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm5fa9c6hng64p74dor6y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm5fa9c6hng64p74dor6y.png" alt="Google faucet: Transaction complete, 0.05 Sepolia ETH sent"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't use MetaMask's &lt;strong&gt;Add funds&lt;/strong&gt; or &lt;strong&gt;Buy&lt;/strong&gt; buttons: they buy real crypto with real money.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;W4. Open Remix and describe the contracts to it.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://remix.ethereum.org" rel="noopener noreferrer"&gt;remix.ethereum.org&lt;/a&gt; (it may move you to &lt;code&gt;app.remix.live&lt;/code&gt;; that's the same thing). If it asks you to sign in, sign in with your MetaMask wallet. It's free.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Files&lt;/strong&gt; in the left bar, then the &lt;strong&gt;new file&lt;/strong&gt; icon. Name the file &lt;code&gt;telegraph.sol&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Paste this into it:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface TelegraphTest {
    function mint(address to, uint256 amount) external;
    function approve(address spender, uint256 amount) external returns (bool);
    function depositUSDC(uint256 amount) external;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Compile&lt;/strong&gt; in the left bar, then &lt;strong&gt;Compile telegraph.sol&lt;/strong&gt;. A green tick means it worked.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This file only tells Remix the names of three buttons on contracts that already exist. Nothing new is created.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;W5. Connect Remix to MetaMask.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Deploy&lt;/strong&gt; in the left bar.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Environment&lt;/strong&gt;, choose &lt;strong&gt;Browser Extension&lt;/strong&gt;, then &lt;strong&gt;MetaMask&lt;/strong&gt; in the box next to it.
Approve the connection in MetaMask.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl5blk06tshutvlcz9fuv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl5blk06tshutvlcz9fuv.png" alt="Remix Environment list: choose Browser Extension"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check three things: the badge says &lt;strong&gt;Sepolia (11155111)&lt;/strong&gt;, the account is your test address, and the balance is your test ETH (about 0.05). If the badge says &lt;strong&gt;Main (1)&lt;/strong&gt;, switch MetaMask back to Sepolia: MetaMask has a network choice per website at the bottom of its window.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsyto6ghw8jvlsav92c9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsyto6ghw8jvlsav92c9z.png" alt="Remix connected: Browser Extension, MetaMask, Sepolia (11155111), TelegraphTest compiled"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;W6. Get test USDC and put 0.20 of it into Telegraph.&lt;/strong&gt; You add two contracts to Remix, one per address, then press three buttons in this order: &lt;strong&gt;mint&lt;/strong&gt;, &lt;strong&gt;approve&lt;/strong&gt;, &lt;strong&gt;depositUSDC&lt;/strong&gt;. Each button opens MetaMask: check it says Sepolia, confirm, and wait for the green tick in Remix's console at the bottom before the next one.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;Deployed Contracts&lt;/strong&gt; tab and click &lt;strong&gt;+ Add Contract&lt;/strong&gt;. Keep &lt;code&gt;telegraph.sol&lt;/code&gt; open in the editor: Remix uses it for the buttons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delete anything already in the address box&lt;/strong&gt;, paste the test USDC address&lt;code&gt;0xcc194e1a843B658526D0D5C431f670028582Ae17&lt;/code&gt; and click &lt;strong&gt;Add&lt;/strong&gt;. Remix sometimes fills in your own address here; that's wrong and the buttons will fail.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmnuaxmqf7l71omvbl1w0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmnuaxmqf7l71omvbl1w0.png" alt="Add a deployed contract, with the USDC address pasted"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A card appears: &lt;strong&gt;TelegraphTest&lt;/strong&gt;, &lt;strong&gt;Sepolia&lt;/strong&gt;, &lt;code&gt;0xcc1…Ae17&lt;/code&gt;. On this card:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;mint&lt;/strong&gt;: &lt;code&gt;to&lt;/code&gt; = your address, &lt;code&gt;amount&lt;/code&gt; = &lt;code&gt;1000000&lt;/code&gt; (that's 1 USDC; USDC counts in millionths).
Click &lt;strong&gt;Transact&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;approve&lt;/strong&gt;: &lt;code&gt;spender&lt;/code&gt; = &lt;code&gt;0x72a70e949362670Bf8bceAd24eFC5b8f950aa08b&lt;/code&gt; (Telegraph's payment
contract), &lt;code&gt;amount&lt;/code&gt; = &lt;code&gt;200000&lt;/code&gt; (0.20 USDC). Click &lt;strong&gt;Transact&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftvbyoro1nfyvzbbtmo7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftvbyoro1nfyvzbbtmo7v.png" alt="The approve button filled in on the 0xcc1…Ae17 card, and the green tick in the console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;+ Add Contract&lt;/strong&gt; again, delete what's in the box, paste Telegraph's payment contract &lt;code&gt;0x72a70e949362670Bf8bceAd24eFC5b8f950aa08b&lt;/code&gt; and click &lt;strong&gt;Add&lt;/strong&gt;. A second card appears: &lt;code&gt;0x72a…aa08b&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;that&lt;/strong&gt; card: &lt;strong&gt;depositUSDC&lt;/strong&gt;: &lt;code&gt;amount&lt;/code&gt; = &lt;code&gt;200000&lt;/code&gt;. Click &lt;strong&gt;Transact&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1ndewi3bws5rhfqyrf6x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1ndewi3bws5rhfqyrf6x.png" alt="depositUSDC 200000 on the 0x72a…aa08b card, both transactions green"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each card shows all three buttons, but only some work there: &lt;strong&gt;mint&lt;/strong&gt; and &lt;strong&gt;approve&lt;/strong&gt; on the &lt;code&gt;0xcc1…&lt;/code&gt; card, &lt;strong&gt;depositUSDC&lt;/strong&gt; on the &lt;code&gt;0x72a…&lt;/code&gt; card. If MetaMask or Remix says &lt;strong&gt;gas estimation failed&lt;/strong&gt; or &lt;strong&gt;execution reverted&lt;/strong&gt;, cancel: you're on the wrong card, or approve hasn't finished yet. Don't choose to send anyway.&lt;/p&gt;

&lt;p&gt;MetaMask may also offer to turn your account into a &lt;strong&gt;smart account&lt;/strong&gt;, and Remix may then show a different "to" address (a MetaMask contract). That's fine: your address and key stay the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check:&lt;/strong&gt; open &lt;code&gt;https://devnode.telegraphprotocol.com/v1/ledger/account/&amp;lt;your address&amp;gt;&lt;/code&gt;. &lt;code&gt;available&lt;/code&gt; should say &lt;code&gt;200000&lt;/code&gt;, which is 0.20 USDC, enough for about 10 answers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;W7. Copy the private key.&lt;/strong&gt; This is the password-like secret the bot uses to pay.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In MetaMask, open the account list, click &lt;strong&gt;⋮&lt;/strong&gt; next to your test account, then &lt;strong&gt;Account details&lt;/strong&gt; → &lt;strong&gt;Show private key&lt;/strong&gt;, and enter your MetaMask password.&lt;/li&gt;
&lt;li&gt;Copy it. It must be &lt;code&gt;0x&lt;/code&gt; followed by 64 letters and digits (66 characters in all). If what MetaMask shows already starts with &lt;code&gt;0x&lt;/code&gt;, use it as it is. If it doesn't, type &lt;code&gt;0x&lt;/code&gt; in front.&lt;/li&gt;
&lt;li&gt;Keep it to yourself: anyone with it controls this account. Don't paste it into chats or issues.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Part C: connect the bot (5 min, in the browser)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;C1. Give the bot the wallet key.&lt;/strong&gt; In your fork: &lt;strong&gt;Settings → Secrets and variables → Actions → Secrets tab → New repository secret&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name: &lt;code&gt;TELEGRAPH_EVM_PRIVATE_KEY&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Secret: the private key from Part B, starting with &lt;code&gt;0x&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;C2. Nothing else to set for a test.&lt;/strong&gt; The workflow file in C3 already contains defaults: the bot pays only for releases published after &lt;strong&gt;1 Jan 2026&lt;/strong&gt;, and opens free PRs for older ones. Why a date: an AI coding assistant can't know about releases after its training data ends, so that's where paid answers help. If you don't use an AI assistant, it's simply the date that limits what gets bought.&lt;/p&gt;

&lt;p&gt;For real use, set your own model's date: &lt;strong&gt;Variables tab → New repository variable&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODEL_CUTOFF&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;the "training data cutoff" from your model provider's page, e.g. &lt;code&gt;2025-03-01&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODEL_CUTOFF_SOURCE_URL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;that page, e.g. &lt;a href="https://docs.anthropic.com/en/docs/about-claude/models/overview" rel="noopener noreferrer"&gt;Anthropic's&lt;/a&gt; or &lt;a href="https://platform.openai.com/docs/models" rel="noopener noreferrer"&gt;OpenAI's&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODEL_CUTOFF_STATUS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;team-assumed&lt;/code&gt;, or &lt;code&gt;provider-documented&lt;/code&gt; together with &lt;code&gt;MODEL_PROVIDER&lt;/code&gt; and &lt;code&gt;MODEL_ID&lt;/code&gt; (see the &lt;a href="https://github.com/borodedamie/telegraph-pr-agent#install-in-your-repository-5-minutes" rel="noopener noreferrer"&gt;README&lt;/a&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;C3. Add the first workflow file.&lt;/strong&gt; On your fork's main page: &lt;strong&gt;Add file → Create new file&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the file name box type exactly &lt;code&gt;.github/workflows/telegraph-dependency-updates.yml&lt;/code&gt;. Typing
the &lt;code&gt;/&lt;/code&gt; creates the folders.&lt;/li&gt;
&lt;li&gt;Paste the text below.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Commit changes&lt;/strong&gt; → &lt;strong&gt;Commit directly to the main branch&lt;/strong&gt; → &lt;strong&gt;Commit changes&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Check your branch name.&lt;/strong&gt; Line 5 says &lt;code&gt;branches: [main]&lt;/code&gt;. Replace &lt;code&gt;main&lt;/code&gt; with your repository's default branch: the name on the branch button on its main page (often &lt;code&gt;main&lt;/code&gt;, sometimes &lt;code&gt;master&lt;/code&gt; or &lt;code&gt;develop&lt;/code&gt;). Without this, the bot still runs with &lt;strong&gt;Run workflow&lt;/strong&gt;, but not automatically after a push.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Telegraph dependency updates&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;main&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'**/package.json'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'**/package-lock.json'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'**/pnpm-lock.yaml'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'**/yarn.lock'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'**/bun.lock'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'**/requirements*.txt'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'requirements/**'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

&lt;span class="na"&gt;concurrency&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;telegraph-dependency-updates-${{ github.repository }}&lt;/span&gt;
  &lt;span class="na"&gt;cancel-in-progress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;update-dependencies&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;github.ref_type == 'branch' &amp;amp;&amp;amp; github.event.deleted != true &amp;amp;&amp;amp; !startsWith(github.ref_name, 'fix/telegraph-dependency-')&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt;
      &lt;span class="na"&gt;pull-requests&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683&lt;/span&gt; &lt;span class="c1"&gt;# v4
&lt;/span&gt;        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.ref_name }}&lt;/span&gt;
          &lt;span class="na"&gt;persist-credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020&lt;/span&gt; &lt;span class="c1"&gt;# v4
&lt;/span&gt;        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;borodedamie/telegraph-pr-agent@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;monthly-budget-usdc&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.MONTHLY_BUDGET_USDC }}&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;TELEGRAPH_EVM_PRIVATE_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.TELEGRAPH_EVM_PRIVATE_KEY }}&lt;/span&gt;
          &lt;span class="na"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.token }}&lt;/span&gt;
          &lt;span class="na"&gt;MODEL_CUTOFF&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.MODEL_CUTOFF || '2026-01-01' }}&lt;/span&gt;
          &lt;span class="na"&gt;MODEL_PROVIDER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.MODEL_PROVIDER }}&lt;/span&gt;
          &lt;span class="na"&gt;MODEL_ID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.MODEL_ID }}&lt;/span&gt;
          &lt;span class="na"&gt;MODEL_CUTOFF_SOURCE_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.MODEL_CUTOFF_SOURCE_URL || 'https://docs.anthropic.com/en/docs/about-claude/models/overview' }}&lt;/span&gt;
          &lt;span class="na"&gt;MODEL_CUTOFF_STATUS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.MODEL_CUTOFF_STATUS || 'team-assumed' }}&lt;/span&gt;
          &lt;span class="na"&gt;PREFERRED_MINER_ID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.PREFERRED_MINER_ID || '7314' }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This one does the work: reads your dependencies, buys the answers, opens the pull requests. The line &lt;code&gt;uses: borodedamie/telegraph-pr-agent@v1&lt;/code&gt; is where GitHub downloads the bot from.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  Don't want to commit to the main branch? Use a test branch instead
  &lt;p&gt;The bot opens its pull requests into the branch it ran on, so it can live entirely on a test branch:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a branch, e.g. &lt;code&gt;telegraph-test&lt;/code&gt;, from the branch button on the repository's main page.&lt;/li&gt;
&lt;li&gt;In C3 and C4, switch to &lt;code&gt;telegraph-test&lt;/code&gt; before &lt;strong&gt;Add file&lt;/strong&gt;, and commit to it.&lt;/li&gt;
&lt;li&gt;In the C3 file, set &lt;code&gt;branches: [telegraph-test]&lt;/code&gt; and &lt;strong&gt;delete the &lt;code&gt;paths:&lt;/code&gt; line&lt;/strong&gt;. Then committing the workflow file is itself the push that starts the first run.&lt;/li&gt;
&lt;li&gt;Skip D1: the &lt;strong&gt;Run workflow&lt;/strong&gt; button only appears for files on the default branch. Watch the run in the &lt;strong&gt;Actions&lt;/strong&gt; tab instead; to run it again, push any commit to &lt;code&gt;telegraph-test&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The bot's PRs then target &lt;code&gt;telegraph-test&lt;/code&gt;, and your main branch is never touched. On the spend page, a PR merged into &lt;code&gt;telegraph-test&lt;/code&gt; shows as closed, not merged, unless you add the variable &lt;code&gt;MERGE_BRANCHES&lt;/code&gt; = &lt;code&gt;telegraph-test&lt;/code&gt;.&lt;/p&gt;



&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C4. Add the second workflow file&lt;/strong&gt; the same way, named&lt;br&gt;
&lt;code&gt;.github/workflows/telegraph-pr-outcomes.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Telegraph PR outcomes&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pull_request_target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;closed&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;record-outcome&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;github.event.pull_request.head.repo.full_name == github.repository &amp;amp;&amp;amp; startsWith(github.event.pull_request.head.ref, 'fix/telegraph-dependency-')&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt;
      &lt;span class="na"&gt;pull-requests&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683&lt;/span&gt; &lt;span class="c1"&gt;# v4
&lt;/span&gt;        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.event.repository.default_branch }}&lt;/span&gt;
          &lt;span class="na"&gt;persist-credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;borodedamie/telegraph-pr-agent@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;merge-pr-number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.event.pull_request.number }}&lt;/span&gt;
          &lt;span class="na"&gt;merge-branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.MERGE_BRANCHES }}&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.token }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This one only records when you merge or close one of the bot's pull requests. It has no wallet key and never runs the pull request's code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part D: run it and look (2 min)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;D1. Run.&lt;/strong&gt; &lt;strong&gt;Actions tab → Telegraph dependency updates&lt;/strong&gt; (left list) &lt;strong&gt;→ Run workflow → Run workflow&lt;/strong&gt;. Wait about a minute until it turns green.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;D2. Look at the result.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pull requests tab:&lt;/strong&gt; one PR per dependency update. Paid ones have &lt;strong&gt;What changed&lt;/strong&gt; and &lt;strong&gt;Where this repository uses what changed&lt;/strong&gt;. Updates released before the cutoff get a &lt;strong&gt;free PR&lt;/strong&gt;, with no purchase: for npm packages the bot reads the release notes itself and lists what it finds (usually fewer items than a paid answer) and where your code uses them; otherwise the PR links the release notes. At most 5 free PRs per run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spend page:&lt;/strong&gt; &lt;code&gt;https://telegraph-pr-agent.vercel.app/?repo=OWNER/REPO&lt;/code&gt;, where &lt;code&gt;OWNER/REPO&lt;/code&gt; is
your fork exactly as in its GitHub URL. For &lt;code&gt;https://github.com/alice/my-fork&lt;/code&gt; it's
&lt;code&gt;https://telegraph-pr-agent.vercel.app/?repo=alice/my-fork&lt;/code&gt;. It shows every purchase with its
receipt.&lt;/li&gt;
&lt;li&gt;A branch &lt;code&gt;ledger&lt;/code&gt; appears in your fork with the purchase records, but only once the bot has
bought something or opened a PR. Leave it there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;D3. Use the PR: you or your coding assistant.&lt;/strong&gt; This is the point of the bot. Your AI coding assistant (Claude Code, Copilot, Cursor…) can't know a release that came out after its training data ends, so left alone it guesses. The PR gives it sourced facts instead: point the assistant at the PR and ask it to apply the steps under &lt;strong&gt;What changed&lt;/strong&gt; to the lines listed under &lt;strong&gt;Where this repository uses what changed&lt;/strong&gt;, then run your tests. Without an assistant, the same two sections are a checklist for doing it by hand. The bot itself doesn't edit your code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;D4. Optional:&lt;/strong&gt; merge the PR. The spend page then shows &lt;strong&gt;cost per merged PR&lt;/strong&gt;: everything the bot spent in the repository divided by the bot's PRs merged into your default branch. A PR closed without merging still counts its spend, so the number shows what one merged upgrade really cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  If something goes wrong
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you see&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The run fails with &lt;code&gt;403&lt;/code&gt; when opening PRs&lt;/td&gt;
&lt;td&gt;Step A3 wasn't saved. Tick it and re-run: answers already bought are reused, not paid again&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No &lt;strong&gt;Run workflow&lt;/strong&gt; button&lt;/td&gt;
&lt;td&gt;The C3 file isn't in &lt;code&gt;.github/workflows/&lt;/code&gt; on the main branch, or Actions is off (A2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Payment refused / nothing bought&lt;/td&gt;
&lt;td&gt;Check that &lt;code&gt;available&lt;/code&gt; (end of Part B) is above 0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Invalid TELEGRAPH_EVM_PRIVATE_KEY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The secret must be &lt;code&gt;0x&lt;/code&gt; followed by 64 letters and digits. Add the &lt;code&gt;0x&lt;/code&gt; if it's missing (W7)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Warning &lt;code&gt;… can't be installed alongside the repository's current dependencies (…); skipped, no purchase made&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;That upgrade needs another package upgraded first, e.g. &lt;code&gt;react-dom&lt;/code&gt; 19 needs &lt;code&gt;react&lt;/code&gt; 19. Nothing was bought&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Warning &lt;code&gt;Lock regeneration does not support local, URL, Git or alias dependencies&lt;/code&gt; on every package&lt;/td&gt;
&lt;td&gt;The project has a dependency from GitHub, a URL or a local folder, so the bot skips everything. Nothing was bought. Use another project (A1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Doesn't run on its own after a push&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;branches: [main]&lt;/code&gt; in the C3 file doesn't match your default branch. Change it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Green run but no PRs, no &lt;code&gt;ledger&lt;/code&gt; branch, empty spend page&lt;/td&gt;
&lt;td&gt;The bot found nothing it supports. Open the run and read the yellow warnings at the top. No warning means no dependency has a newer release: try another project&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How it decides to spend
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It buys only for releases dated after &lt;code&gt;MODEL_CUTOFF&lt;/code&gt;. That's a lookup of the release date on the package registry, not a model's guess.&lt;/li&gt;
&lt;li&gt;Before paying, it checks that your package manager can actually install the new version. If it can't, it skips the update and buys nothing.&lt;/li&gt;
&lt;li&gt;An upgrade already proposed is not proposed again.&lt;/li&gt;
&lt;li&gt;Limits: 0.10 USDC per answer and 2 USDC per run by default, plus an optional monthly budget. A payment interrupted halfway can't be paid twice.&lt;/li&gt;
&lt;li&gt;What's charged: every answer miner 7314 gives, including "not found" (no usable release notes)
and "unclear question". Only "temporarily unavailable", when a source it needs is down, is free.
An answer is bought once and reused on later runs.&lt;/li&gt;
&lt;li&gt;Python packages are answered by other ranked miners, not 7314; their answers are charged too, even when the bot rejects one as unusable.&lt;/li&gt;
&lt;li&gt;A human merges. The bot never merges, and it uses no AI of its own: everything it knows, it buys.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we learned building on Telegraph
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Escrow is fast.&lt;/strong&gt; In our 5 Nov tests a paid call took a median 2.0 s with escrow, against 13.3 s with one on-chain payment per call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask a specialised miner by id.&lt;/strong&gt; Telegraph's automatic routing classified package questions as web search and sent them elsewhere, so the bot asks miner 7314 first and falls back to ranked miners.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A cached answer is still charged.&lt;/strong&gt; Retries must be different requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Miner answers are untrusted input.&lt;/strong&gt; Miner 7314 checks that every quote is an exact substring of the source it fetched, and never takes versions, dates or links from a model.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tried it?
&lt;/h2&gt;

&lt;p&gt;Open an &lt;a href="https://github.com/borodedamie/telegraph-pr-agent/issues" rel="noopener noreferrer"&gt;issue&lt;/a&gt; with what you ran and&lt;br&gt;
whether the answer was useful, or leave a comment here. That's the most useful thing you can send&lt;br&gt;
us.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>githubactions</category>
      <category>ai</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
