Inflynce Create Campaign
What is Inflynce?
Inflynce Marketing lets anyone boost a link using USDC and reward real users based on measurable social influence (Mindshare). You set a budget and eligible users (Farcaster for now, expanding to X) engage with your link to earn rewards instantly. You can BOOST any link on internet — tweets, project websites, Youtube videos, Farcaster casts — to get visibility. Inflynce runs on Base and does not custody user funds.
This skill creates boost campaigns on Inflynce via the postBoostWeb GraphQL mutation.
Project Structure
CODEBLOCK0
Prerequisites
- 1. Install dependencies: Run
npm install once before using any script. - Platform fee: Each campaign requires 0.25 USDC. The creator wallet MUST have already sent exactly 0.25 USDC to Inflynce on Base. See "How to Pay 0.25 USDC" below.
- Config: Set
GRAPHQL_URL to https://boost.inflynce.com/api/graphql. For programmatic pay/top-up, also set PRIVATE_KEY (creator wallet private key). - Gas: The wallet running
pay_fee.js or top_up.js needs Base ETH for gas, in addition to USDC.
Environment variables
CODEBLOCK1
Note on RPC: pay_fee.js and top_up.js use viem's default public Base RPC if no RPC_URL is provided. This may be rate-limited under heavy load. For production use, supply a dedicated RPC URL from a provider such as Alchemy, Infura, or QuickNode.
Security
GRAPHQL_URL is enforced at runtime. The script validates that the URL host is exactly boost.inflynce.com and that the protocol is https. Any other value causes an immediate error before any data is sent. You cannot override this to a different endpoint.
PRIVATE_KEY is highly sensitive. It signs real Base transactions. Only supply it if you understand the risk. Prefer doing the 0.25 USDC payment and top-ups manually via boost.inflynce.com to avoid storing a private key in the agent.
Hardcoded addresses (verify at boost.inflynce.com or Inflynce docs):
| Purpose | Address | Chain |
|---|
| 0.25 USDC fee recipient | INLINECODE14 | Base |
| USDC contract |
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | Base (Circle) |
| Boosts contract (approve spender) |
0x6e6A6128bB0c175989066eb0e2bf54F06688207b | Base |
Usage
Live campaign
CODEBLOCK2
Dry run (no API call, no payment required)
Use --dry-run to validate inputs and inspect what would be sent without creating a real campaign. Any valid-format payment hash works for testing.
CODEBLOCK3
Or use run_script with the script path. Required args:
- -
--cast-url: Any https URL — tweet, project website, Farcaster cast, etc. - INLINECODE20 : On-chain tx hash proving 0.25 USDC payment
- INLINECODE21 : Ethereum address (validated against payment sender)
- INLINECODE22 : Campaign budget in USDC (minimum 5 USDC)
Optional args:
- -
--multiplier: Integer 1–10, default 1. Scales the reward cost per engagement. Use a higher multiplier to attract higher-influence users; use 1 for broad, cost-efficient reach. - INLINECODE24 : Override the GraphQL endpoint (must still be
https://boost.inflynce.com). Useful when GRAPHQL_URL env var is not set. - INLINECODE27 : Validate inputs and print the payload without calling the API.
Example output
A successful campaign creation returns:
CODEBLOCK4
Use id to track or reference the campaign. boostStatus will be ACTIVE immediately after creation.
Supported URLs
- - Tweets:
https://x.com/... or INLINECODE32 - Project websites: INLINECODE33
- Farcaster casts: INLINECODE34
- Any https link
API Reference
- - Endpoint: INLINECODE35
- Mutation: INLINECODE36
- Auth: None (payment hash proves authorization)
- Returns: INLINECODE37
- appType: This skill sends
appType: 2 (Agent). Web UI uses appType: 1. Filter mindshare_boosts by app_type = 2 to find agent-created campaigns.
Flow
- 1. Top up — Approve USDC for the boosts contract (min 5 USDC). See "How to Top Up" below.
- Pay 0.25 USDC — Platform fee per campaign. See "How to Pay 0.25 USDC" below.
- Run this skill with the payment tx hash; campaign is created and returns boost ID.
- Top up again anytime to increase budget.
How to Pay 0.25 USDC
Each campaign requires a 0.25 USDC transfer to Inflynce on Base. The tx hash is the proof.
Agent (programmatic)
⚠️ No dry-run available. This script broadcasts a real transaction immediately. Ensure the wallet has USDC and Base ETH for gas before running.
CODEBLOCK5
Sends USDC.transfer(0xA61529732F4E71ef1586252dDC97202Ce198A38A, 0.25) on Base.
Output:
CODEBLOCK6
Extract txHash from stdout and pass it as --payment-hash to create_campaign.js.
Human (wallet)
- 1. Ensure wallet has USDC on Base
- Send exactly 0.25 USDC to INLINECODE46
- Use the transaction hash as INLINECODE47
How to Top Up
Option A: Agent (programmatic)
⚠️ No dry-run available. This script broadcasts a real transaction immediately. Ensure the wallet has USDC and Base ETH for gas before running.
CODEBLOCK7
INLINECODE48 defaults to 50 if omitted. Minimum is 5 USDC.
This sends an ERC-20 approve tx: USDC.approve(BOOSTS_CONTRACT, amount) on Base. The agent's wallet must hold USDC and Base ETH for gas.
Output:
CODEBLOCK8
Option B: Human (web UI)
- 1. Go to boost.inflynce.com
- Connect the creator wallet
- Click Top Up Your Spending or Approve USDC
- Enter amount (minimum 5 USDC), confirm in wallet
Errors & Troubleshooting
| Error | Cause | Fix |
|---|
| INLINECODE52 | Env var not set and --graphql-url not passed | Set GRAPHQL_URL in env or pass INLINECODE55 |
| INLINECODE56 |
URL points to a host other than
boost.inflynce.com | Use the correct endpoint |
|
must use HTTPS |
GRAPHQL_URL uses
http:// | Switch to
https:// |
|
payment-hash must be a valid tx hash | Hash is not 0x + 64 hex chars | Use the exact on-chain tx hash |
|
Minimum budget is 5 USDC |
--budget is below 5 | Set budget to 5 or higher |
|
Invalid URL |
--cast-url is not https or a raw 0x hash | Use a full
https:// URL |
|
Private key required |
PRIVATE_KEY not set for pay
fee/topup | Set
PRIVATE_KEY env var or pass
--private-key 0x... |
|
Amount must be at least 5 USDC | top_up amount below minimum | Use
--amount 5 or higher |
| API: payment hash already used | Same tx hash submitted twice | Pay a new 0.25 USDC fee; get a fresh tx hash |
| API: budget below minimum | Server-side budget validation | Increase
--budget |
FAQ
What URL formats are supported?
Any valid https:// URL can be used in an Inflynce Boost campaign. This includes tweets from x.com or twitter.com, project websites, YouTube links, and Farcaster casts from base.app or farcaster.xyz. For Farcaster casts, the system extracts the cast hash directly from the URL path. For all other URLs, the system generates a unique identifier using keccak256(URL).
What is the minimum budget?
The minimum campaign budget is 5 USDC. Before creating a campaign, you must set a spending limit using top_up.js or the web interface at boost.inflynce.com.
Does Inflynce custody my funds?
No. Inflynce does not custody user funds. When creating a campaign, you approve USDC to the boost contract, and rewards are paid directly from your wallet to users when they engage with the campaign.
How do I get USDC on Base?
You can obtain USDC on Base by bridging funds from Ethereum or another supported network, swapping tokens on Base for USDC, or withdrawing USDC from an exchange that supports the Base network such as Coinbase. You will need USDC on Base for campaign fees and budgets, and ETH on Base to pay gas fees.
Can I reuse a payment hash for multiple campaigns?
No. Each campaign requires its own 0.25 USDC payment. You must run pay_fee.js or send a 0.25 USDC payment manually once for every new campaign that you create.
How do I know if a campaign was created by an AI agent?
Campaigns created through this skill include the parameter appType: 2. You can identify them by filtering the mindshare_boosts table where app_type = 2. Campaigns created through the web interface use appType: 1.
What is Mindshare?
Mindshare is Inflynce's metric for measuring a user's social influence on the Farcaster network for now. It is calculated from meaningful engagement signals such as likes, replies, recasts, and follows. Users with higher Mindshare receive higher rewards when participating in campaigns because payouts are pegged to Mindshare.
What is minMindshare?
For this skill, the minMindshare value is fixed at 0.003. This threshold ensures that only users with a minimum level of influence can participate in campaigns, which protects campaign budgets from bots, scripted accounts, and low-quality engagement.
What is the cost multiplier?
The --multiplier parameter controls the reward cost per engagement. It accepts values from 1 to 10, and the default value is 1. Increasing the multiplier attracts users with higher Mindshare but will consume the campaign budget faster. For most campaigns, starting with a multiplier of 1 is recommended.
Which chain is used for payments?
All payments are executed on Base mainnet. Testnet networks are not supported for pay_fee or top_up operations.
Inflynce 创建推广活动
什么是 Inflynce?
Inflynce 营销让任何人都可以使用 USDC 推广链接,并根据可衡量的社交影响力(心智份额)奖励真实用户。你设定预算,符合条件的用户(目前为 Farcaster,即将扩展到 X)与你的链接互动即可立即获得奖励。你可以推广互联网上的任何链接——推文、项目网站、YouTube 视频、Farcaster 帖子——以获得曝光度。Inflynce 运行在 Base 链上,且不托管用户资金。
此技能通过 postBoostWeb GraphQL 变更在 Inflynce 上创建推广活动。
项目结构
inflynce-create-campaign/
├── scripts/
│ ├── create_campaign.js # 创建推广活动(主脚本)
│ ├── payfee.js # 支付 0.25 USDC 平台费用(需要 PRIVATEKEY)
│ └── topup.js # 为推广合约批准 USDC 预算(需要 PRIVATEKEY)
├── test/
│ └── create_campaign.test.js
├── package.json
├── clawhub.json
└── SKILL.md
前置条件
- 1. 安装依赖:使用任何脚本前先运行 npm install。
- 平台费用:每个推广活动需要 0.25 USDC。创建者钱包必须已在 Base 链上向 Inflynce 发送恰好 0.25 USDC。参见下方如何支付 0.25 USDC。
- 配置:将 GRAPHQLURL 设置为 https://boost.inflynce.com/api/graphql。如需程序化支付/充值,还需设置 PRIVATEKEY(创建者钱包私钥)。
- Gas 费:运行 payfee.js 或 topup.js 的钱包除了需要 USDC 外,还需要 Base ETH 作为 Gas 费。
环境变量
env
GRAPHQL_URL=https://boost.inflynce.com/api/graphql
PRIVATEKEY=0x... # 可选——仅 payfee.js 和 top_up.js 需要
可选:提供自己的 Base RPC 以避免公共端点速率限制
RPC_URL=https://mainnet.base.org
关于 RPC 的说明: 如果未提供 RPCURL,payfee.js 和 top_up.js 将使用 viem 的默认公共 Base RPC。在高负载下可能会受到速率限制。生产环境使用时,请从 Alchemy、Infura 或 QuickNode 等提供商处获取专用 RPC URL。
安全性
GRAPHQL_URL 在运行时强制执行。 脚本会验证 URL 主机名必须为 boost.inflynce.com,协议必须为 https。任何其他值都会在发送任何数据前立即报错。你不能将其覆盖为其他端点。
PRIVATEKEY 高度敏感。 它会签署真实的 Base 交易。只有在你了解风险的情况下才提供。建议通过 boost.inflynce.com 手动完成 0.25 USDC 支付和充值,以避免在代理中存储私钥。
硬编码地址(请在 boost.inflynce.com 或 Inflynce 文档中验证):
| 用途 | 地址 | 链 |
|---|
| 0.25 USDC 费用接收方 | 0xA61529732F4E71ef1586252dDC97202Ce198A38A | Base |
| USDC 合约 |
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | Base (Circle) |
| 推广合约(批准支出方) | 0x6e6A6128bB0c175989066eb0e2bf54F06688207b | Base |
使用方法
创建真实推广活动
bash
npm install && node scripts/create_campaign.js \
--cast-url https://... \
--payment-hash 0x<0.25USDC支付的交易哈希> \
--creator-wallet 0x... \
--budget 50 \
[--multiplier 1] \
[--graphql-url https://boost.inflynce.com/api/graphql]
模拟运行(不调用 API,无需支付)
使用 --dry-run 验证输入并查看将要发送的内容,而不创建真实推广活动。任何格式有效的支付哈希都可用于测试。
bash
node scripts/create_campaign.js \
--dry-run \
--cast-url https://x.com/user/status/123 \
--payment-hash 0x$(python3 -c print(ab*32)) \
--creator-wallet 0x... \
--budget 10
或者使用 run_script 配合脚本路径。必需参数:
- - --cast-url:任何 https URL——推文、项目网站、Farcaster 帖子等。
- --payment-hash:证明 0.25 USDC 支付的链上交易哈希
- --creator-wallet:以太坊地址(会与支付发送方进行验证)
- --budget:推广活动预算(USDC 计,最低 5 USDC)
可选参数:
- - --multiplier:整数 1–10,默认为 1。调整每次互动的奖励成本。使用较高的乘数以吸引高影响力用户;使用 1 以获得广泛、成本效益高的覆盖。
- --graphql-url:覆盖 GraphQL 端点(仍必须是 https://boost.inflynce.com)。当未设置 GRAPHQL_URL 环境变量时有用。
- --dry-run:验证输入并打印载荷,不调用 API。
示例输出
成功创建推广活动返回:
json
{
id: cm9abc123def456,
boostStatus: ACTIVE,
creatorWallet: 0x000...0001
}
使用 id 跟踪或引用推广活动。boostStatus 在创建后立即为 ACTIVE。
支持的 URL
- - 推文:https://x.com/... 或 https://twitter.com/...
- 项目网站:https://example.com
- Farcaster 帖子:https://warpcast.com/~/casts/0x...
- 任何 https 链接
API 参考
- - 端点:POST https://boost.inflynce.com/api/graphql
- 变更:postBoostWeb(input: PostBoostWebInput!)
- 认证:无(支付哈希证明授权)
- 返回:{ id, boostStatus, creatorWallet }
- appType:此技能发送 appType: 2(代理)。网页界面使用 appType: 1。通过 apptype = 2 过滤 mindshareboosts 可找到代理创建的推广活动。
流程
- 1. 充值——为推广合约批准 USDC(最低 5 USDC)。参见下方如何充值。
- 支付 0.25 USDC——每个推广活动的平台费用。参见下方如何支付 0.25 USDC。
- 使用支付交易哈希运行此技能;推广活动创建成功并返回推广 ID。
- 随时再次充值以增加预算。
如何支付 0.25 USDC
每个推广活动需要向 Base 链上的 Inflynce 转账 0.25 USDC。交易哈希即为证明。
代理方式(程序化)
⚠️ 无模拟运行。 此脚本会立即广播真实交易。运行前确保钱包有 USDC 和 Base ETH 作为 Gas 费。
bash
npm install && node scripts/pay_fee.js
通过环境变量传入 PRIVATE_KEY:
PRIVATE
KEY=0x... node scripts/payfee.js
或作为内联标志传入:
node scripts/pay_fee.js --private-key 0x...
在 Base 链上发送 USDC.transfer(0xA61529732F4E71ef1586252dDC97202Ce198A38A, 0.25)。
输出:
json
{ txHash: 0xabc...def, amount: 0.25, chain: base }
从标准输出中提取 txHash,并将其作为 --payment-hash 传递给 create_campaign.js。
人工方式(钱包)
- 1. 确保钱包在 Base 链上有 USDC
- 向 0xA61529732F4E71ef1586252dDC97202Ce198A38A 发送恰好 0.25 USDC
- 使用该交易哈希作为 --payment-h