Search projects, hackathons, sponsors and tech

    ← All projects

    AgentKit Swaps&Types

    1. Swap, quote and token-find actions for AgentKit leveraging Sushi infrastructure. 2. Major type-safety improvement.

    Demo

    About

    The project encompasses two main parts: 1. Simple, on-chain swaps using Sushi, across many evm-based networks. This includes token address lookup, human-readable to "machine" amount conversion (0.1 ETH is 1e17 wei), and quote checks (the agent first fetches a quote, offers it to the user and only proceeds with the swap if the user agrees). 2. Major type cleanup. Allows for a safer and simpler experience for developers. - ViemWalletProvider was heavily cleaned up, type-wise. ReadContract function now behaves as expected, SignTypedData is now typed, etc. - CdpWalletProvider and the parent class EvmWalletProvider have received similar improvements. - 0x${string} has been replaced with Address and Hex approprietly. - The Network type has been tightened down considerably, including the chain and network id maps - Instead of regexes, address checks in zod schemas now use the isAddress function from viem https://github.com/coinbase/agentkit/issues/310

    How it's made

    - The Sushi Router API (for swaps and quotes) and Sushi Data API (for token lookups) - OpenAI for agent testing, AgentKit for tying it all together - VSCode, ~6 fingers (I refuse to learn full touch-typing) and a healthy amount of caffeine That's about it, not much more to say, character limit etc.