commit
免费Handle git commits with auto-staging, targeted pre-commit formatting, and Conventional Commit messages. Use when the user says commit it, commit this, commit changes, save my changes, or similar git commit requests.
中文简介正在准备中。当前显示原文说明。
Generate Foundry smoke tests that validate deployment health using DeployManager/Resolver against real on-chain state with pending governance applied. Use when the user asks for smoke tests, deployment verification tests, or post-deploy health checks.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Generate Foundry smoke tests that verify deployment health by bootstrapping the actual deployed state (including pending governance) via the DeployManager/Resolver pipeline.
| Aspect | Unit Tests | Fork Tests | Smoke Tests |
|---|---|---|---|
| State | Fresh deploys with mocks | Fresh deploys on fork | Actual deployed state via Resolver |
| Purpose | Full coverage, fuzz | Integration paths | Verify deployment health |
| Contracts | Deployed in setUp | Mix fresh + forked | All resolved from DeployManager |
| Actors | makeAddr("Governor") | makeAddr("Governor") | ousd.governor() (live) |
| Tokens | MockERC20.mint() | deal() | deal() |
| Fuzz | Yes | No | No |
Smoke tests answer "Is this deployment safe to execute?" — not "Does this code work?"
contracts/tests/smoke/<category>/<Product>/
├── shared/
│ └── Shared.t.sol
└── concrete/
├── ViewFunctions.t.sol
├── Mint.t.sol
├── Redeem.t.sol
└── Transfer.t.sol
Rules:
fuzz/ directoryforge-std/Test
└─ Base
└─ BaseFork
└─ BaseSmoke
└─ Smoke_<Product>_Shared_Test
└─ Smoke_Concrete_<Product>_<Feature>_Test
Base owns shared actors, constants, IERC20 external token refs, and fork IDs. All typed contract/proxy state variables are declared in each Shared.t.sol using interface types.
BaseSmoke provides:
resolver — deterministic address: Resolver(address(uint160(uint256(keccak256("Resolver")))))_igniteDeployManager() — runs the full deployment pipeline: parse JSON, etch Resolver, replay scripts, simulate governanceSame rules as unit and fork tests — use interfaces, not concrete contracts:
IVault internal ousdVault;ousd = IOToken(resolver.resolve("OUSD_PROXY"));emit IVault.YieldDistribution(...);IVault, IOToken, IWOToken, IProxy, plus strategy interfaces in contracts/interfaces/strategies/| Product | Token | Vault | Chain |
|---|---|---|---|
| OUSD | OUSD | OUSDVault | Mainnet |
| OETH | OETH | OETHVault | Mainnet |
| OETHBase | OETHBase | OETHBaseVault | Base |
shared/Shared.t.sol should keep setup in this order:
function setUp() public virtual override {
super.setUp();
_createAndSelectFork<Chain>();
_igniteDeployManager();
_fetchContracts();
_resolveActors();
_labelContracts();
}
Critical rules:
ousd = IOToken(resolver.resolve("OUSD_PROXY"))governor = ousd.governor()require(address(resolver).code.length > 0, "Resolver not initialized")File and contract naming:
concrete/Mint.t.sol
Smoke_Concrete_<Product>_Mint_Test
Function naming patterns:
test_<function>()test_<function>_<behavior>()test_<function>_RevertWhen_<condition>()test_<function>_emits<EventName>()Casing rules:
camelCaseRevertWhen is the only PascalCase token in the test nameSmoke-test these:
rebasingSupply + nonRebasingSupply ≈ totalSupply)Do not smoke-test:
deal() for real tokensUse deal(), not mock minting. Tokens on fork are real.
Add to the existing balance; do not overwrite:
deal(address(usdc), address(vault), usdc.balanceOf(address(vault)) + yieldAmount);
On mainnet fork, most tokens sit in strategies. Ensure vault liquidity before claiming withdrawals:
function _ensureVaultLiquidity(uint256 extra) internal {
(uint256 queued, uint256 claimable,,) = vault.withdrawalQueueMetadata();
uint256 shortfall = queued > claimable ? queued - claimable : 0;
uint256 needed = shortfall + extra;
if (needed > token.balanceOf(address(vault))) {
deal(address(token), address(vault), needed);
}
vault.addWithdrawalQueueLiquidity();
}
Live state has rounding. Use approximate comparisons:
assertApproxEqRel(calculatedSupply, ousd.totalSupply(), 1e14); // 0.01%
assertApproxEqAbs(balanceAfter - balanceBefore, expected, 1e18);
The vault may trigger rebase during mint. Use assertGe for total supply changes:
assertGe(totalSupplyAfter - totalSupplyBefore, mintedAmount - 1e18);
When implementing smoke tests:
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Handle git commits with auto-staging, targeted pre-commit formatting, and Conventional Commit messages. Use when the user says commit it, commit this, commit changes, save my changes, or similar git commit requests.
中文简介正在准备中。当前显示原文说明。
Generate Foundry fork tests for contracts that need real on-chain integration coverage. Use when the user asks for fork tests, mainnet or chain fork coverage, or integration tests against live protocol state.
中文简介正在准备中。当前显示原文说明。
Reorganize Foundry test files (*.t.sol) for readability and consistency without changing semantics. Use when the user asks to organize, reorder, clean up, tidy, or reformat a test file's structure.
中文简介正在准备中。当前显示原文说明。
Develop, modify, review, and maintain standalone Talos actions in contracts/tasks/actions, including chain guardrails, contract bindings, transaction safety, schedules, action catalogues, and Talos documentation. Use when adding an action, changing an action’s behavior or parameters, updating a Talos schedule, or maintaining action runtime support.
中文简介正在准备中。当前显示原文说明。
Generate Foundry unit tests for a contract using this repository's conventions, structure, and naming. Use when the user asks for unit tests, Foundry tests, concrete tests, or fuzz tests.
中文简介正在准备中。当前显示原文说明。
Verifies a POST-EXECUTION mainnet (or other network) smart-contract deployment PR for this repo: confirms every deployed contract is listed in the PR description, that the on-chain verified source (and its dependencies) matches the codebase via `sol2uml diff`, that constructor args and the initialize tx match the Foundry script, and that the on-chain governance proposal matches the script's actions. Use when asked to review, verify, audit, or sign off on an executed deployment PR. Invoke explicitly with /verify-deployment-pr <PR#>.
中文简介正在准备中。当前显示原文说明。