Gougoubi Create Condition
Use this skill to create a condition under an existing Gougoubi proposal from the smallest practical input.
Use This Skill When
- - The user wants to add one or more conditions to an existing proposal.
- The user only provides proposal identifier and condition title.
- The agent should auto-fill default dates and flags.
Do Not Use This Skill When
- - The user wants to create a new proposal. Use
gougoubi-create-prediction. - The user wants activation, result submission, or reward claiming.
Minimal Input
CODEBLOCK0
Defaults
- - Resolve
proposalId to proposalAddress. - INLINECODE3 : proposal deadline.
- INLINECODE4 : user locale, fallback
UTC. - INLINECODE6 :
deadlineDateTime - 1 hour, clamped to a valid future time. - INLINECODE8 : same as
deadlineTimezone. - INLINECODE10 : empty string.
- INLINECODE11 : empty string.
- INLINECODE12 : empty string.
- INLINECODE13 :
true.
Generator Flow
Step 1: Validate minimal input.
Step 2: Resolve proposal and load proposal deadline.
Step 3: Generate all default date fields and clamp invalid values.
Step 4: Convert datetimes to unix seconds.
Step 5: Validate final payload:
- -
conditionName non-empty - INLINECODE16
- INLINECODE17
- INLINECODE18
Step 6: Submit the canonical contract call in this order:
- 1. INLINECODE19
- INLINECODE20
- INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
- INLINECODE25
Step 7: Wait for confirmation and return the normalized payload.
Output
CODEBLOCK1
Failure:
CODEBLOCK2
Boundaries
- - Never bypass wallet confirmation.
- Keep defaults deterministic and explain them in output when relevant.
Gougoubi 创建条件
使用此技能,以最少的实际输入,在现有的 Gougoubi 提案下创建一个条件。
使用此技能的场景
- - 用户想要向现有提案添加一个或多个条件。
- 用户仅提供提案标识符和条件标题。
- 代理应自动填充默认日期和标志。
不使用此技能的场景
- - 用户想要创建新提案。请使用 gougoubi-create-prediction。
- 用户想要激活、提交结果或领取奖励。
最小输入
json
{
proposalId: 0x... 或提案标识符,
conditionName: A队会赢得比赛吗?
}
默认值
- - 将 proposalId 解析为 proposalAddress。
- deadlineDateTime:提案截止日期。
- deadlineTimezone:用户本地时区,回退为 UTC。
- tradeDeadlineDateTime:deadlineDateTime - 1 小时,限制为有效的未来时间。
- tradeDeadlineTimezone:与 deadlineTimezone 相同。
- conditionImageUrl:空字符串。
- conditionRules:空字符串。
- skills:空字符串。
- isNormalized:true。
生成流程
步骤 1:验证最小输入。
步骤 2:解析提案并加载提案截止日期。
步骤 3:生成所有默认日期字段并限制无效值。
步骤 4:将日期时间转换为 Unix 秒数。
步骤 5:验证最终负载:
- - conditionName 非空
- deadline > 当前时间
- tradeDeadline > 当前时间
- tradeDeadline <= deadline
步骤 6:按以下顺序提交规范的合约调用:
- 1. conditionName
- deadline
- tradeDeadline
- conditionImageUrl
- conditionRules
- skills
- isNormalized
步骤 7:等待确认并返回规范化负载。
输出
json
{
ok: true,
mode: browser|contract,
txHash: 0x...,
proposalAddress: 0x...,
normalizedInput: {
proposalId: ,
proposalAddress: ,
conditionName: ,
deadlineDateTime: ,
deadlineTimezone: ,
tradeDeadlineDateTime: ,
tradeDeadlineTimezone: ,
defaultsApplied: true,
tradeDeadlinePolicy: deadline-minus-1h-with-valid-clamp
},
warnings: []
}
失败:
json
{
ok: false,
stage: validation|resolve-proposal|create|confirm,
error: 原因,
retryable: true
}
边界
- - 绝不要绕过钱包确认。
- 保持默认值确定性,并在相关时在输出中解释它们。