Repository navigation
Conversation
Adds madBountyActionProvider with get_bounty, list_open_bounties, post_bounty, claim_bounty, submit_work, settle_bounty and cancel_bounty for the MAD Bounty USDC escrow on base-mainnet and base-sepolia.
🟡 Heimdall Review Status
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
madBountyActionProvider, an EVM action provider for MAD Bounty: a dual-deposit USDC bounty escrow on Base. It lets an agent post tasks for humans or other agents, take on tasks as a worker, and settle work as a verifier, all with plain contract calls throughEvmWalletProvider(no new dependencies, no API keys).How the protocol works:
MADBSPEC1/MADBEVID1marker + UTF-8 JSON/text), and their keccak256 hashes are stored on-chain so readers can verify them.Supported networks:
base-mainnet,base-sepolia(supportsNetworkreturns false for everything else).Actions
get_bountylist_open_bountiespost_bountyPostedevent. Verifier address is required (never guessed); verifier adapter contracts that need per-bounty config are refusedclaim_bountysubmit_workevidenceHash = keccak256(evidence), evidence text appended to calldatasettle_bountycancel_bountyEvery write action pre-checks state, role, deadlines, amounts and USDC balance, and returns a descriptive error instead of sending a transaction that would revert. Action descriptions carry explicit safety notes for the LLM: bugs are permanent, verifier silence pays the worker, a reject burns reward and deposit, specs and evidence are public forever.
Files
typescript/agentkit/src/action-providers/madBounty/(madBountyActionProvider.ts,schemas.ts,constants.tswith minimal ABI fragments and deployments,utils.ts,index.ts,README.md,madBountyActionProvider.test.ts)typescript/agentkit/src/action-providers/index.ts(export)typescript/agentkit/README.md(actions table)typescript/.changeset/mad-bounty-action-provider.md(minor)Scaffolded with
pnpm run generate:action-provider -n madBounty -p evm -t base-mainnet,base-sepolia -w EvmWalletProvider.Testing
pnpm test -- madBounty: 61 tests pass, covering every action (happy path, every validation error, reverted receipts, send failures), schema validation, calldata encoding (decodedpost/claim/submit/settle/cancelargs, spec and evidence round-trip after the markers with hash match),Postedevent id extraction, andeth_getLogschunking (≤ 10,000 blocks down to the deploy block). Coverage on the provider folder: 100% lines, 85% branches.pnpm testintypescript/agentkit: 64 suites, 984 tests pass.pnpm lint: clean.prettier --checkon all changed files: clean.tsc --noEmit: clean.https://base-rpc.publicnode.com) through the built provider with a viem public client:get_bounty(21)→Open, reward 1 USDC, fee 5%, deposit 1 USDC, burn mode.list_open_bounties(3)→ bounties Add ability to pass in custom metadata for wow token creation #46, feat: twitter actions for account mentions and post tweet reply #45, feat: twitter langchain refinements #43 with titles decoded from the on-chain spec and hash-verified.Disclosure
The author of this PR maintains MAD Bounty. The protocol charges a 5% fee on accepted bounties, paid to the MAD Bounty treasury.