AI-bounty-skill ai-bounty-claim
Use when claiming the AI bounty on the tDVV mainnet sidechain. This public claim skill now supports Portkey AA/CA only, requires CA sync and holder preflight before any write, and routes to AA/CA onboarding, AA/CA claim, or diagnostics-only stop handling.
git clone https://github.com/aelf-hzz780/AI-bounty-skill
git clone --depth=1 https://github.com/aelf-hzz780/AI-bounty-skill ~/.claude/skills/aelf-hzz780-ai-bounty-skill-ai-bounty-claim-16fa54
SKILL.mdAI Bounty Claim
Use this skill for AI bounty claiming on
tDVV through RewardClaimContract.
For AA/CA, the standard wallet path in this skill is
manager signer -> CA.ManagerForwardCall -> reward.ClaimByPortkeyToCa(Hash ca_hash).
This skill is intentionally split into one routing file plus focused branch references so weaker agents can follow one path at a time.
Skill Version
- Current skill version:
3.0.0 - If behavior seems inconsistent or an external AI reports unexpected output, ask them to report the
field from thisversion
first.SKILL.md
Compatibility
- AA/CA dependency:
@portkey/ca-agent-skills >= 2.3.0 - AA/CA required dependency interfaces:
- CLI:
manager-sync-status - MCP:
portkey_manager_sync_status
- CLI:
Scope
Supported claim path:
:AA/CAManagerForwardCall(...) -> ClaimByPortkeyToCa(Hash ca_hash)
This skill does not implement:
- wallet custody or wallet creation on behalf of the user
- private key generation, storage, or import on behalf of the user
- Portkey recovery flows on behalf of the user
- blind retry loops after claim failures
- legacy public EOA claim routing
Required Dependency Skills
Use these dependency skills explicitly instead of assuming the host will infer them:
- Portkey CA skill:
(minimum required versionhttps://github.com/Portkey-Wallet/ca-agent-skills
for the AA/CA route)2.3.0
Routing rule:
- use the Portkey CA skill for local AA/CA account setup,
resolution,caHash
, holder lookup onmanager-sync-status
, and recovery/login only when needed to recover local context, resolve the target AA/CA ontDVV
, or recover a usable manager signertDVV
Current Environment Defaults
Use these defaults only when the user is clearly operating in the current AI bounty environment:
- Chain:
tDVV - Environment meaning: current AI bounty mainnet sidechain environment
- Reward contract:
ELF_2fc5uPpboX9K9e9NTiDHxhCcgP8T9nV28BLyK8rDu8JmDpn472_tDVV - Reward contract raw address:
2fc5uPpboX9K9e9NTiDHxhCcgP8T9nV28BLyK8rDu8JmDpn472 - Public RPC:
https://tdvv-public-node.aelf.io - RPC validation endpoint:
https://tdvv-public-node.aelf.io/api/blockChain/chainStatus - Portkey CA contract:
ELF_2UthYi7AHRdfrqc1YCfeQnjdChDLaas65bW4WxESMGMojFiXj9_tDVV - Portkey CA contract raw address:
2UthYi7AHRdfrqc1YCfeQnjdChDLaas65bW4WxESMGMojFiXj9 - Current campaign default reward: Portkey AA/CA
2 AIBOUNTY
Treat reward amounts and addresses as campaign defaults, not permanent protocol constants.
Canonical AA/CA Claim Path
- Always use
as the standard AA/CA wallet operation.manager signer -> Portkey CA contract ManagerForwardCall -> reward contract ClaimByPortkeyToCa(Hash ca_hash) - Always apply this fixed read-only gate before any AA/CA write, and do not skip or reorder it:
- resolve the local AA/CA context and
caHash - call
ormanager-sync-statusportkey_manager_sync_status - call
onGetHolderInfo(caHash)tDVV - only continue when
and the holder can be resolved onisManagerSynced=truetDVV
- resolve the local AA/CA context and
is permissionless at the reward method layer, but this skill still models AA/CA claiming through the standard CA wallet forwarding path.ClaimByPortkeyToCa(Hash ca_hash)- The forwarded reward still goes to the resolved
, not to the manager signer.holderInfo.CaAddress - The forwarded reward method input is
; pass.aelf.Hash
bytes ascaHash
.Hash.value - For SDK or helper calls, use raw CA and reward addresses rather than the wrapped
strings.ELF_..._tDVV - Prefer the high-level helper
in the dependency implementation. Keep lower-level protobuf and descriptor details in the AA/CA branch reference.managerForwardCallWithKey(...) - If the selected CA dependency does not expose
ormanager-sync-status
, stop and tell the user to upgrade toportkey_manager_sync_status
before attempting AA/CA claim.@portkey/ca-agent-skills >= 2.3.0
Gas Rules
Use these gas rules as current environment defaults:
: when the selected signer appears to have little or noAA/CA
, explain that the current environment may still provide a daily gas subsidy worthELF1 ELF
: if the standard wallet path is ready after the fixed read-only gate passes, do not stop before the first send only because visibleAA/CA
is low or zero; show the gas note, require explicit confirmation, and allow one attemptELF
: never infer a fee problem fromAA/CA
,Holder is not found
, or any failed holder lookup; only the final chain errorCA holder not found
may trigger fee guidanceTransaction fee not enough
Treat these gas rules as current environment defaults, not permanent protocol constants.
RPC validation note:
- the RPC root URL may return
404 - do not treat root-path
as proof that the node is down404 - validate node availability through
/api/blockChain/chainStatus
Contract Introspection Guardrail
- Do not use
to conclude that the reward contract lacks write methods./api/contract/contractViewMethodList - Treat
as view-only discovery. If it only shows/api/contract/contractViewMethodList
,GetConfig
,HasAddressClaimed
, or other read methods, that only proves those view methods are visible.HasCaClaimed - If full method verification is needed, use
only as an optional verification path, not as the default claim flow./api/blockChain/contractFileDescriptorSet - When using node introspection APIs, normalize the reward contract address into the format accepted by the endpoint. Do not send the wrapped
address string directly.ELF_..._tDVV - If introspection is ambiguous, incomplete, or returns
because of query format issues, keep using the canonical reward contract address and the supported public AA/CA method already defined in this skill.Not found
Required First Step
For generic claim requests, do not jump directly to an on-chain method.
Examples:
help me claimclaim for me帮我 Claim帮我领取
The agent must first explain:
: account-style experience, typically based on email / guardian / recovery flows, current campaign reward isAA/CA2 AIBOUNTY
: this is the preferred user-facing term in this skillAA
: this is still accepted as an alias because some users still sayCACA
: this route requiresAA/CA
because claim preflight depends on@portkey/ca-agent-skills >= 2.3.0
and holder lookup onmanager-sync-statustDVV
: current environment gas experience is smoother because daily subsidy rules may apply automatically, and the first confirmed AA/CA attempt can usually be tried before fee is treated as the blockerAA/CA
: before any claim write, we must first confirm manager sync and holder readiness onAA/CAtDVV
: this public bounty skill no longer exposes the legacy EOA route, even if older contract source snapshots still show legacy methodsEOA
Then ask the user whether the local Portkey AA/CA context is already ready, or whether they want to recover/login first with
email.
Routing Rules
Choose one branch before asking for extra claim inputs.
Branch 1: Account Choice And Onboarding
Read references/flows/account-choice.md when:
- the user makes a generic claim request
- examples:
,help me claim
,claim for me
,帮我 Claim帮我领取 - the local AA/CA account context is not ready yet
- the user only has an
and needs onboarding, recovery, or login firstemail
Branch 2: Diagnostics And Stop
Read references/flows/diagnostics-stop.md first when any of the following is true:
- the user tries to fill an exchange address, custodial address, or any address without a user-controlled private key
- the user wants the agent to create or hold a wallet for them
- the user says Portkey AA/CA already exists on mainnet but cannot be resolved on
tDVV - the selected Portkey CA dependency is below
or does not expose2.3.0
/manager-sync-statusportkey_manager_sync_status
returnsmanager-sync-statusisManagerSynced=false
cannot resolve the holder onGetHolderInfo(caHash)tDVV- the user says the guardian already exists and recovery is required
- the user insists on using an EOA-only route
- a prior contract call failed and the prerequisite is still unresolved
Branch 3: Portkey AA/CA Claim
Read references/flows/portkey-ca.md when:
- the user explicitly chose
,AA
, orCAAA/CA - a local Portkey AA/CA account is already available, or the target
is already knowncaHash - use the Portkey CA skill dependency at version
for AA/CA handling>= 2.3.0
AA/CA Error Mapping Rules
orHolder is not found
means the holder,CA holder not found
, or target-chain context oncaHash
is not ready yet. Tell the user to wait for sync or re-checktDVV
and chain. Do not suggest addingcaHash
.ELF
means the manager context onSender is not a manager of the CA holder.
is not ready yet, or the current local manager is not a valid manager for the target holder. Tell the user to recover, re-login, or wait for sync.tDVV
is a send-stage fee problem only. Explain that it is a transaction fee issue, not a holder lookup issue.Transaction fee not enough.
means pending transaction lookup only. Keep polling and do not treat it as success, failure, or a fee blocker.NOTEXISTED
Fixed User Messaging
- For a newly registered
AA/CA account, emphasize that the on-chain context is still syncing and the user should retry later.tDVV - For an older account whose origin is
while the claim write target isAELF
, emphasize that cross-chain sync to the sidechain can be slower and the user should wait for manager and holder sync to complete first.tDVV - For
, emphasize that the problem happened at transaction send time and is not a holder lookup problem.Transaction fee not enough
Global Hard Rules
- Always tell the user not to fill exchange or custodial addresses.
- Never offer to create, custody, or store a wallet for the user.
- Do not ask the user to paste an address when a local AA/CA context should be used.
- For generic claim requests, explain that the current public bounty path is AA/CA only, then enter onboarding or claim branching.
- Treat
as the preferred user-facing term, but acceptAA
as the same route alias.CA - Treat the current public bounty flow as AA/CA only, even if older contract source snapshots still contain legacy EOA entries.
- For
, do not attempt any write until the fixed read-only gate has passed: resolve local context andAA/CA
, confirmcaHash
ormanager-sync-status
returnsportkey_manager_sync_status
, and confirmisManagerSynced=true
resolves onGetHolderInfo(caHash)
.tDVV - For
, if the standard wallet path is ready after that gate passes, do not stop before the first confirmed attempt only because visibleAA/CA
is low or zero; show the gas note and allow one confirmed attempt.ELF - For AA/CA, require
because the claim flow depends on@portkey/ca-agent-skills >= 2.3.0
andmanager-sync-status
.portkey_manager_sync_status - When checking whether the
RPC is reachable, querytDVV
instead of the site root.https://tdvv-public-node.aelf.io/api/blockChain/chainStatus - If the RPC root URL returns
but404
returns chain status JSON, treat the node as reachable./api/blockChain/chainStatus - Never use
to decide that/api/contract/contractViewMethodList
does not exist.ClaimByPortkeyToCa(Hash ca_hash) - If full method verification is needed, use
only as an optional verification path./api/blockChain/contractFileDescriptorSet - When using node introspection APIs, normalize the contract address first instead of querying with the wrapped
string directly.ELF_..._tDVV - If introspection remains ambiguous, keep the reward contract address and supported write methods defined in this skill as canonical defaults.
- For AA/CA SDK or helper calls that require raw addresses, use raw CA and reward addresses rather than the wrapped
strings.ELF_..._tDVV - If the local AA/CA context is not ready, guide the user to create, recover, or log in to a local
first, then continue with the matching claim branch.AA/CA
andHolder is not found
mean holder or chain context is not ready; do not reinterpret them as a fee problem and do not suggest addingCA holder not found
.ELF
means manager context is not ready or the resolved manager is not valid for the holder onSender is not a manager of the CA holder.
; prefer recovery, re-login, or waiting for sync.tDVV
only means the transaction is not confirmed yet; it is not a final success or failure state.NOTEXISTED- If the final chain error is
, treat it as an insufficient transaction fee problem from the send stage, not as a claim logic failure and not as a holder lookup problem.Transaction fee not enough - For AA/CA, accept either
oremail
as the starting input. If onlycaHash
is available, use the Portkey CA skill to resolve the targetemail
, and recover a usable manager signer when needed for the standard wallet path.caHash - Prefer the locally resolved AA/CA context for
.ManagerForwardCall(...) -> ClaimByPortkeyToCa(Hash ca_hash) - Do not route the recommended AA/CA claim through deprecated
.ClaimByPortkey(Hash) - Before any AA/CA write, show the resolved manager signer,
result, holder lookup result, CA contract, forwarded reward contract, method chain, key inputs, expected receiver semantics, and current campaign reward amount, then require explicit user confirmation.manager-sync-status - If explicit confirmation is missing, stop before sending.
- If any prerequisite is unresolved, stop and explain the blocker instead of guessing.
- If a submitted transaction returns
, includetxId
andtxId
in the response, even if the final result is still pending lookup.https://aelfscan.io/tDVV/tx/<txid> - If a transaction fails, return the exact chain error and stop. Do not invent recovery success.
Receiver Semantics
sends the reward to the resolved AA/CA address, not to the manager signer.ManagerForwardCall(...) -> ClaimByPortkeyToCa(Hash ca_hash)
Required Reading Pattern
After choosing the branch:
- Read the matching flow document under
.references/flows/ - Read the matching example document under
.references/examples/ - Follow that branch only.
- Do not mix onboarding, diagnostics, and claim instructions in one answer when only one branch is needed.
Branch Map
- Account choice and onboarding: references/flows/account-choice.md Example: references/examples/account-choice.md
- Portkey AA/CA: references/flows/portkey-ca.md Example: references/examples/portkey-ca.md
- Diagnostics and stop: references/flows/diagnostics-stop.md Example: references/examples/diagnostics-stop.md