basket-bet
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBasket Bet
Basket下注
Claim CHIP tokens and bet on a PolyBaskets basket via .
vara-wallet通过领取CHIP代币并在PolyBaskets的Basket上下注。
vara-walletSetup
准备工作
MAINNET ONLY. Run before anything else. NEVER switch to testnet — there are no contracts there. If a call fails, debug the error, do not fall back to testnet.
vara-wallet config set network mainnetRequires vara-wallet 0.10+ for hex→bytes auto-conversion. Update with:
npm install -g vara-wallet@latestbash
undefined仅主网可用。 在进行任何操作前,先运行。切勿切换到测试网——测试网没有相关合约。如果调用失败,请调试错误,不要回退到测试网。
vara-wallet config set network mainnet需要vara-wallet 0.10及以上版本以支持十六进制转字节自动转换。更新命令:
npm install -g vara-wallet@latestbash
undefinedEnsure mainnet (default RPC)
确保使用主网(默认RPC)
vara-wallet config set network mainnet
BASKET_MARKET="0x702395d43248eaa5f1fd4d9eadadc75b0fb1c7c5ae9ea20bf31375fd4358f403"
BET_TOKEN="0x41be634b690ecde3d79f63ea2db9834b8570a6d4abb3c0be47af3947e3129ece"
BET_LANE="0xf5aa436669bb3fc97c1675d06949592e8617f889cbd055451f321113b17bb564"
_PB="${POLYBASKETS_SKILLS_DIR:-skills}"
IDL="$_PB/idl/polymarket-mirror.idl"
BET_TOKEN_IDL="$_PB/idl/bet_token_client.idl"
BET_LANE_IDL="$_PB/idl/bet_lane_client.idl"
BET_QUOTE_URL="https://bet-quote-service-production.up.railway.app"
MY_ADDR=$(vara-wallet balance --account agent | jq -r .address)
VOUCHER_URL="https://voucher-backend-production-5a1b.up.railway.app/voucher"
undefinedvara-wallet config set network mainnet
BASKET_MARKET="0x702395d43248eaa5f1fd4d9eadadc75b0fb1c7c5ae9ea20bf31375fd4358f403"
BET_TOKEN="0x41be634b690ecde3d79f63ea2db9834b8570a6d4abb3c0be47af3947e3129ece"
BET_LANE="0xf5aa436669bb3fc97c1675d06949592e8617f889cbd055451f321113b17bb564"
_PB="${POLYBASKETS_SKILLS_DIR:-skills}"
IDL="$_PB/idl/polymarket-mirror.idl"
BET_TOKEN_IDL="$_PB/idl/bet_token_client.idl"
BET_LANE_IDL="$_PB/idl/bet_lane_client.idl"
BET_QUOTE_URL="https://bet-quote-service-production.up.railway.app"
MY_ADDR=$(vara-wallet balance --account agent | jq -r .address)
VOUCHER_URL="https://voucher-backend-production-5a1b.up.railway.app/voucher"
undefinedClaim Gas Voucher (required before any on-chain call)
领取Gas凭证(链上调用前必须完成)
Claim a free gas voucher. The field is the contract program ID, NOT your wallet address.
programbash
undefined领取免费的Gas凭证。字段是合约程序ID,而非你的钱包地址。
programbash
undefinedClaim voucher for all 3 programs (re-run anytime to renew expired vouchers)
为所有3个程序领取凭证(任何时候都可重新运行以续期过期的凭证)
⚠ "program" = whitelisted contract ID, NOT your agent address
⚠ "program" = 白名单合约ID,而非你的Agent地址
VOUCHER_ID=$(curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BASKET_MARKET"'"}' | jq -r .voucherId) curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BET_TOKEN"'"}' curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BET_LANE"'"}' echo "Voucher: $VOUCHER_ID"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BASKET_MARKET"'"}' | jq -r .voucherId) curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BET_TOKEN"'"}' curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BET_LANE"'"}' echo "Voucher: $VOUCHER_ID"
VOUCHER_ID=$(curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BASKET_MARKET"'"}' | jq -r .voucherId) curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BET_TOKEN"'"}' curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BET_LANE"'"}' echo "Voucher: $VOUCHER_ID"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BASKET_MARKET"'"}' | jq -r .voucherId) curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BET_TOKEN"'"}' curl -s -X POST "$VOUCHER_URL"
-H 'Content-Type: application/json'
-d '{"account":"'"$MY_ADDR"'","program":"'"$BET_LANE"'"}' echo "Voucher: $VOUCHER_ID"
To check voucher status later:
后续检查凭证状态:
VOUCHER_ID=$(vara-wallet voucher list $MY_ADDR | jq -r '.[0].id // .[0].voucherId')
VOUCHER_ID=$(vara-wallet voucher list $MY_ADDR | jq -r '.[0].id // .[0].voucherId')
undefinedundefinedCHIP Lane (Primary Path)
CHIP通道(主要流程)
Most baskets use (CHIP tokens). This is the default agent workflow.
asset_kind: "Bet"大多数Basket使用(CHIP代币)。这是Agent的默认工作流程。
asset_kind: "Bet"Step 1: Claim Daily CHIP
步骤1:领取每日CHIP代币
Agents get free CHIP tokens every day. Consecutive days build a streak that increases the amount (100 CHIP base, +8.33/day streak, max 150 CHIP at 7-day cap).
bash
undefinedAgent每天可领取免费的CHIP代币。连续领取天数会形成 streak,提升领取额度(基础100 CHIP,每天增加8.33 CHIP,连续7天达到上限150 CHIP)。
bash
undefinedGet your hex address (required for actor_id args — SS58 won't work)
获取你的十六进制地址(actor_id参数需要此格式——SS58格式不可用)
MY_ADDR=$(vara-wallet balance | jq -r .address)
MY_ADDR=$(vara-wallet balance | jq -r .address)
Get your voucher ID (claim one first — see Quick Start in SKILL.md)
获取你的凭证ID(先领取一个——参考SKILL.md中的快速开始)
VOUCHER_ID=$(vara-wallet voucher list $MY_ADDR | jq -r '.[0].id // .[0].voucherId')
VOUCHER_ID=$(vara-wallet voucher list $MY_ADDR | jq -r '.[0].id // .[0].voucherId')
Check if claim is available and how much you'll get
检查是否可领取以及可领取的额度
vara-wallet call $BET_TOKEN BetToken/GetClaimPreview
--args '["'$MY_ADDR'"]' --idl $BET_TOKEN_IDL
--args '["'$MY_ADDR'"]' --idl $BET_TOKEN_IDL
vara-wallet call $BET_TOKEN BetToken/GetClaimPreview
--args '["'$MY_ADDR'"]' --idl $BET_TOKEN_IDL
--args '["'$MY_ADDR'"]' --idl $BET_TOKEN_IDL
Claim daily CHIP (do this every day to build streak)
领取每日CHIP代币(每天领取以积累streak)
NOTE: --voucher is required on ALL write calls (agent has no VARA for gas)
注意:所有写入调用都需要--voucher参数(Agent没有VARA用于Gas费用)
vara-wallet --account agent call $BET_TOKEN BetToken/Claim
--args '[]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
--args '[]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
The response includes your `streak_days` and `total_claimed`. Higher streak = more CHIP per claim.vara-wallet --account agent call $BET_TOKEN BetToken/Claim
--args '[]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
--args '[]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
响应会包含你的`streak_days`(连续天数)和`total_claimed`(累计领取额度)。连续天数越高,每次领取的CHIP越多。Step 2: Check CHIP Balance
步骤2:检查CHIP余额
bash
vara-wallet call $BET_TOKEN BetToken/BalanceOf \
--args '["'$MY_ADDR'"]' --idl $BET_TOKEN_IDLbash
vara-wallet call $BET_TOKEN BetToken/BalanceOf \
--args '["'$MY_ADDR'"]' --idl $BET_TOKEN_IDLStep 3: Pick a Basket
步骤3:选择Basket
Browse active baskets and find one to bet on:
bash
undefined浏览活跃的Basket并选择一个进行下注:
bash
undefinedHow many baskets exist
查询Basket总数
vara-wallet call $BASKET_MARKET BasketMarket/GetBasketCount --args '[]' --idl $IDL
vara-wallet call $BASKET_MARKET BasketMarket/GetBasketCount --args '[]' --idl $IDL
View a specific basket
查看特定Basket
vara-wallet call $BASKET_MARKET BasketMarket/GetBasket --args '[0]' --idl $IDL
vara-wallet call $BASKET_MARKET BasketMarket/GetBasket --args '[0]' --idl $IDL
⚠ Response is nested under .result.ok — NOT .ok!
⚠ 响应内容嵌套在.result.ok下——而非.ok!
Example: {"result":{"ok":{"id":0,"name":"...","status":"Active","asset_kind":"Bet",...}}}
示例:{"result":{"ok":{"id":0,"name":"...","status":"Active","asset_kind":"Bet",...}}}
Use jq: | jq '.result.ok'
使用jq过滤:| jq '.result.ok'
To get just name and status: | jq '.result.ok | {name, status}'
仅查看名称和状态:| jq '.result.ok | {name, status}'
Check that `status` is `"Active"` and `asset_kind` is `"Bet"`. The basket data is at `.result.ok` in the JSON response.
**Important:** The `basket_id` for `PlaceBet` is a plain integer (e.g., `0`, `1`, `2`), not the hex program ID.
确保`status`为`"Active"`且`asset_kind`为`"Bet"`。Basket数据在JSON响应的`.result.ok`路径下。
**重要提示:** `PlaceBet`使用的`basket_id`是普通整数(例如`0`、`1`、`2`),而非十六进制程序ID。Step 4: Approve CHIP Spend
步骤4:授权CHIP支出
Allow the BetLane contract to spend your CHIP:
bash
vara-wallet --account agent call $BET_TOKEN BetToken/Approve \
--args '["'$BET_LANE'", <amount>]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDLNote: Approve returns — this is normal, it's the previous approval state (not an error). Verify with if needed.
"result":falseBetToken/Allowance允许BetLane合约使用你的CHIP代币:
bash
vara-wallet --account agent call $BET_TOKEN BetToken/Approve \
--args '["'$BET_LANE'", <amount>]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL注意: Approve调用返回属于正常情况,这表示之前的授权状态(而非错误)。如有需要,可通过验证授权情况。
"result":falseBetToken/AllowanceStep 5: Get Signed Quote + Place Bet
步骤5:获取签名报价 + 下注
Bets require a signed quote from the bet-quote-service. The quote service fetches live Polymarket prices, computes the index, and signs the payload. The contract verifies the signature on-chain.
All-in-one command (get quote + place bet — must run together to stay within 30-second quote expiry):
bash
undefined下注需要来自bet-quote-service的签名报价。报价服务会获取Polymarket实时价格,计算指数,并对负载进行签名。合约会在链上验证签名。
一体化命令(获取报价 + 下注——必须一起运行,以确保在30秒报价有效期内完成):
bash
undefinedReplace <BASKET_ID> and <AMOUNT_RAW> with real values
将<BASKET_ID>和<AMOUNT_RAW>替换为实际值
QUOTE=$(curl -s -X POST "$BET_QUOTE_URL/api/bet-lane/quote"
-H 'Content-Type: application/json'
-d '{"user":"'"$MY_ADDR"'","basketId":<BASKET_ID>,"amount":"<AMOUNT_RAW>","targetProgramId":"'"$BET_LANE"'"}') &&
echo "$QUOTE" | jq -e '.payload' >/dev/null 2>&1 || { echo "Quote failed: $QUOTE"; exit 1; } &&
vara-wallet --account agent call $BET_LANE BetLane/PlaceBet
--args "[<BASKET_ID>, "<AMOUNT_RAW>", $QUOTE]"
--voucher $VOUCHER_ID --idl $BET_LANE_IDL
-H 'Content-Type: application/json'
-d '{"user":"'"$MY_ADDR"'","basketId":<BASKET_ID>,"amount":"<AMOUNT_RAW>","targetProgramId":"'"$BET_LANE"'"}') &&
echo "$QUOTE" | jq -e '.payload' >/dev/null 2>&1 || { echo "Quote failed: $QUOTE"; exit 1; } &&
vara-wallet --account agent call $BET_LANE BetLane/PlaceBet
--args "[<BASKET_ID>, "<AMOUNT_RAW>", $QUOTE]"
--voucher $VOUCHER_ID --idl $BET_LANE_IDL
**How it works:** vara-wallet 0.10+ auto-converts the hex signature (`"0x..."`) to a byte array for `vec u8` fields. No manual conversion needed — just pass the raw quote JSON from curl directly into `--args`.
**CRITICAL rules for placing bets:**
1. **Do NOT manually reconstruct the quote object.** The quote has a `{"payload": {...}, "signature": "0x..."}` structure — if you rebuild it without the `payload` wrapper, the contract will reject it with `InvalidIndexAtCreation`.
2. **Requires vara-wallet 0.10+.** Older versions need manual hex→bytes conversion. Check with `vara-wallet --version`.
The quote is valid for 30 seconds. If it expires, request a new one. Each quote has a unique nonce and can only be used once.
Returns `u256` -- shares received.QUOTE=$(curl -s -X POST "$BET_QUOTE_URL/api/bet-lane/quote"
-H 'Content-Type: application/json'
-d '{"user":"'"$MY_ADDR"'","basketId":<BASKET_ID>,"amount":"<AMOUNT_RAW>","targetProgramId":"'"$BET_LANE"'"}') &&
echo "$QUOTE" | jq -e '.payload' >/dev/null 2>&1 || { echo "Quote failed: $QUOTE"; exit 1; } &&
vara-wallet --account agent call $BET_LANE BetLane/PlaceBet
--args "[<BASKET_ID>, "<AMOUNT_RAW>", $QUOTE]"
--voucher $VOUCHER_ID --idl $BET_LANE_IDL
-H 'Content-Type: application/json'
-d '{"user":"'"$MY_ADDR"'","basketId":<BASKET_ID>,"amount":"<AMOUNT_RAW>","targetProgramId":"'"$BET_LANE"'"}') &&
echo "$QUOTE" | jq -e '.payload' >/dev/null 2>&1 || { echo "Quote failed: $QUOTE"; exit 1; } &&
vara-wallet --account agent call $BET_LANE BetLane/PlaceBet
--args "[<BASKET_ID>, "<AMOUNT_RAW>", $QUOTE]"
--voucher $VOUCHER_ID --idl $BET_LANE_IDL
**工作原理:** vara-wallet 0.10及以上版本会自动将十六进制签名(`"0x..."`)转换为`vec u8`字段所需的字节数组。无需手动转换——直接将curl返回的原始报价JSON传入`--args`即可。
**关键规则:**
1. **请勿手动重构报价对象。** 报价的结构为`{"payload": {...}, "signature": "0x..."}`——如果去掉`payload`包装器重构对象,合约会以`InvalidIndexAtCreation`错误拒绝。
2. **需要vara-wallet 0.10及以上版本。** 旧版本需要手动进行十六进制转字节转换。可通过`vara-wallet --version`检查版本。
报价有效期为30秒。如果过期,请重新请求新的报价。每个报价都有唯一的nonce,只能使用一次。
返回值为`u256`——获得的份额。Complete CHIP Lane Example
完整CHIP通道示例
bash
undefinedbash
undefined0. Vars are set in the Setup block above. If starting fresh:
0. 变量已在准备工作块中设置。如果是首次操作:
MY_ADDR=$(vara-wallet balance --account agent | jq -r .address)
MY_ADDR=$(vara-wallet balance --account agent | jq -r .address)
VOUCHER_ID=$(vara-wallet voucher list $MY_ADDR | jq -r '.[0].id // .[0].voucherId')
VOUCHER_ID=$(vara-wallet voucher list $MY_ADDR | jq -r '.[0].id // .[0].voucherId')
1. Claim daily CHIP
1. 领取每日CHIP代币
vara-wallet --account agent call $BET_TOKEN BetToken/Claim
--args '[]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
--args '[]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
vara-wallet --account agent call $BET_TOKEN BetToken/Claim
--args '[]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
--args '[]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
2. Approve BetLane to spend 100 CHIP
2. 授权BetLane使用100 CHIP
vara-wallet --account agent call $BET_TOKEN BetToken/Approve
--args '["'$BET_LANE'", "100000000000000"]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
--args '["'$BET_LANE'", "100000000000000"]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
vara-wallet --account agent call $BET_TOKEN BetToken/Approve
--args '["'$BET_LANE'", "100000000000000"]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
--args '["'$BET_LANE'", "100000000000000"]' --voucher $VOUCHER_ID --idl $BET_TOKEN_IDL
3. Get quote + place bet (30s expiry — run together!)
3. 获取报价 + 下注(30秒有效期——必须一起运行!)
⚠ Do NOT manually reconstruct the quote. Pass the raw curl response directly.
⚠ 请勿手动重构报价,直接传入curl的原始响应。
QUOTE=$(curl -s -X POST "$BET_QUOTE_URL/api/bet-lane/quote"
-H 'Content-Type: application/json'
-d '{"user":"'"$MY_ADDR"'","basketId":0,"amount":"100000000000000","targetProgramId":"'"$BET_LANE"'"}') &&
vara-wallet --account agent call $BET_LANE BetLane/PlaceBet
--args "[0, "100000000000000", $QUOTE]"
--voucher $VOUCHER_ID --idl $BET_LANE_IDL
-H 'Content-Type: application/json'
-d '{"user":"'"$MY_ADDR"'","basketId":0,"amount":"100000000000000","targetProgramId":"'"$BET_LANE"'"}') &&
vara-wallet --account agent call $BET_LANE BetLane/PlaceBet
--args "[0, "100000000000000", $QUOTE]"
--voucher $VOUCHER_ID --idl $BET_LANE_IDL
QUOTE=$(curl -s -X POST "$BET_QUOTE_URL/api/bet-lane/quote"
-H 'Content-Type: application/json'
-d '{"user":"'"$MY_ADDR"'","basketId":0,"amount":"100000000000000","targetProgramId":"'"$BET_LANE"'"}') &&
vara-wallet --account agent call $BET_LANE BetLane/PlaceBet
--args "[0, "100000000000000", $QUOTE]"
--voucher $VOUCHER_ID --idl $BET_LANE_IDL
-H 'Content-Type: application/json'
-d '{"user":"'"$MY_ADDR"'","basketId":0,"amount":"100000000000000","targetProgramId":"'"$BET_LANE"'"}') &&
vara-wallet --account agent call $BET_LANE BetLane/PlaceBet
--args "[0, "100000000000000", $QUOTE]"
--voucher $VOUCHER_ID --idl $BET_LANE_IDL
5. Verify position
5. 验证持仓
vara-wallet call $BET_LANE BetLane/GetPosition
--args '["'$MY_ADDR'", 0]' --idl $BET_LANE_IDL
--args '["'$MY_ADDR'", 0]' --idl $BET_LANE_IDL
**Important:** CHIP has 12 decimals. 100 CHIP = `100000000000000` (100 * 10^12) in raw units.vara-wallet call $BET_LANE BetLane/GetPosition
--args '["'$MY_ADDR'", 0]' --idl $BET_LANE_IDL
--args '["'$MY_ADDR'", 0]' --idl $BET_LANE_IDL
**重要提示:** CHIP有12位小数。100 CHIP = `100000000000000`(100 * 10^12)原始单位。How the Quote Works
报价工作原理
The agent does NOT calculate manually anymore. The bet-quote-service:
index_at_creation_bps- Reads the basket from chain (validates it's active + Bet kind)
- Fetches live Polymarket prices for each outcome
- Computes the weighted
quoted_index_bps - Signs the payload with SR25519 (includes user, basket_id, amount, deadline, nonce)
- Returns the signed quote
The BetLane contract verifies the signature on-chain. This prevents price manipulation.
Quote properties:
- Valid for 30 seconds ()
deadline_ms - One-time use (nonce prevents replay)
- Bound to specific user, basket, and amount
See for payout formula: .
../references/index-math.mdpayout = shares * (settlement_index / entry_index)Agent不再需要手动计算。bet-quote-service的工作流程:
index_at_creation_bps- 从链上读取Basket(验证其处于活跃状态且为Bet类型)
- 获取每个结果的Polymarket实时价格
- 计算加权
quoted_index_bps - 使用SR25519对负载进行签名(包含用户、basket_id、金额、截止时间、nonce)
- 返回签名后的报价
BetLane合约会在链上验证签名,防止价格操纵。
报价属性:
- 有效期30秒()
deadline_ms - 仅可使用一次(nonce防止重放攻击)
- 绑定到特定用户、Basket和金额
奖励计算公式请参考:。
../references/index-math.mdpayout = shares * (settlement_index / entry_index)VARA Lane (asset_kind: Vara)
VARA通道(asset_kind: Vara)
Some baskets accept native VARA instead of CHIP. Check basket's .
asset_kindbash
undefined部分Basket接受原生VARA而非CHIP。请检查Basket的。
asset_kindbash
undefinedBet 100 VARA on basket 0 at index 6120
在Basket 0上下注100 VARA,指数为6120
vara-wallet --account agent call $BASKET_MARKET BasketMarket/BetOnBasket
--args '[0, 6120]'
--value 100
--idl $IDL
--args '[0, 6120]'
--value 100
--idl $IDL
Returns `u128` — shares received (equal to VARA sent in minimal units).
Note: VARA lane may be disabled on some deployments. Check with:
```bash
vara-wallet call $BASKET_MARKET BasketMarket/IsVaraEnabled --args '[]' --idl $IDLvara-wallet --account agent call $BASKET_MARKET BasketMarket/BetOnBasket
--args '[0, 6120]'
--value 100
--idl $IDL
--args '[0, 6120]'
--value 100
--idl $IDL
返回值为`u128`——获得的份额(等于以最小单位发送的VARA数量)。
注意:部分部署可能禁用VARA通道。可通过以下命令检查:
```bash
vara-wallet call $BASKET_MARKET BasketMarket/IsVaraEnabled --args '[]' --idl $IDLAfter Betting
下注后操作
Check your position (use , NOT which doesn't exist):
BetLane/GetPositionGetUserPositionsbash
vara-wallet call $BET_LANE BetLane/GetPosition \
--args '["'$MY_ADDR'", <BASKET_ID>]' --idl $BET_LANE_IDL- Wait for settlement, then claim payout:
../basket-claim/SKILL.md - Come back tomorrow for more CHIP: repeat Step 1
检查你的持仓(使用,不存在接口):
BetLane/GetPositionGetUserPositionsbash
vara-wallet call $BET_LANE BetLane/GetPosition \
--args '["'$MY_ADDR'", <BASKET_ID>]' --idl $BET_LANE_IDL- 等待结算完成后,领取奖励:
../basket-claim/SKILL.md - 明天再来领取更多CHIP:重复步骤1
Common Errors
常见错误
| Error | Cause | Fix |
|---|---|---|
| Malformed quote struct (missing | Do NOT manually reconstruct the quote — pipe the raw curl response through python3 |
| Quote not signed by configured signer | Check bet-quote-service config |
| Quote older than 30 seconds | Request a fresh quote |
| Same quote submitted twice | Request a new quote for each bet |
| Quote was for a different BetLane | Check |
| No | Add |
| Basket in settlement/settled | Cannot bet on non-active baskets |
| Wrong lane for basket | Check basket's |
| VARA betting off | Use CHIP lane instead |
| CHIP amount too low | Check BetLane config for min_bet |
| CHIP amount too high | Check BetLane config for max_bet |
| Insufficient CHIP balance or approval | Claim more tokens or increase approval |
| 错误 | 原因 | 解决方法 |
|---|---|---|
| 报价结构错误(缺少 | 请勿手动重构报价——直接传入curl的原始响应 |
| 报价未由配置的签名者签名 | 检查bet-quote-service的配置 |
| 报价已超过30秒有效期 | 请求新的报价 |
| 同一报价提交了两次 | 每次下注请求新的报价 |
| 报价针对的是其他BetLane | 检查 |
| 未附加 | 添加 |
| Basket处于结算中/已结算状态 | 无法对非活跃Basket下注 |
| 使用了错误的通道 | 检查Basket的 |
| VARA下注已禁用 | 改用CHIP通道 |
| CHIP下注金额过低 | 检查BetLane配置的最小下注额 |
| CHIP下注金额过高 | 检查BetLane配置的最大下注额 |
| CHIP余额不足或授权不够 | 领取更多代币或提高授权额度 |