google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
crane-camelot
This skill should be used when the user asks about "Camelot integration", "Camelot swap", "Camelot liquidity", "Camelot V2", "fee-on-transfer tokens", "asymmetric fees", "directional fees", or needs to interact with Camelot DEX on Arbitrum using Crane's service library.
Full skill instructions
Crane provides Camelot V2 integration with service library, stubs, and test infrastructure. Camelot differs from standard Uniswap V2 forks by supporting asymmetric (directional) fees.
| Component | Location | Purpose |
|---|---|---|
CamelotV2Service | services/CamelotV2Service.sol | Swap, deposit, withdraw operations |
CamelotV2RouterAwareRepo | CamelotV2RouterAwareRepo.sol | Router dependency injection |
CamelotV2FactoryAwareRepo | CamelotV2FactoryAwareRepo.sol | Factory dependency injection |
TestBase_CamelotV2 | test/bases/TestBase_CamelotV2.sol | Full protocol deployment |
Camelot pools have directional fees - different fees for each swap direction:
// Camelot's getReserves returns fees for each direction
(uint112 reserve0, uint112 reserve1, uint16 token0feePercent, uint16 token1FeePercent) = pool.getReserves();
// token0feePercent: Fee when swapping token0 -> token1
// token1FeePercent: Fee when swapping token1 -> token0
import {CamelotV2Service} from "@crane/contracts/protocols/dexes/camelot/v2/services/CamelotV2Service.sol";
import {ICamelotV2Router} from "@crane/contracts/interfaces/protocols/dexes/camelot/v2/ICamelotV2Router.sol";
import {ICamelotPair} from "@crane/contracts/interfaces/protocols/dexes/camelot/v2/ICamelotPair.sol";
contract CamelotSwapper {
ICamelotV2Router public router;
function swap(
ICamelotPair pool,
IERC20 tokenIn,
IERC20 tokenOut,
uint256 amountIn
) external returns (uint256 amountOut) {
tokenIn.transferFrom(msg.sender, address(this), amountIn);
amountOut = CamelotV2Service._swap(
router,
pool,
amountIn,
tokenIn,
tokenOut,
address(0) // referrer (optional)
);
}
}
function _deposit(
ICamelotV2Router router,
IERC20 tokenA,
IERC20 tokenB,
uint256 amountADesired,
uint256 amountBDesired
) internal returns (uint256 liquidity);
// Direct withdrawal (no router)
function _withdrawDirect(
ICamelotPair pool,
uint256 amt
) internal returns (uint256 amount0, uint256 amount1);
// Swap with pool auto-detection
function _swap(
ICamelotV2Router router,
ICamelotPair pool,
uint256 amountIn,
IERC20 tokenIn,
IERC20 tokenOut,
address referrer
) internal returns (uint256 amountOut);
// Swap with explicit reserves and fees
function _swap(
ICamelotV2Router router,
uint256 amountIn,
IERC20 tokenIn,
uint256 reserveIn,
uint256 feePercent,
IERC20 tokenOut,
uint256 reserveOut,
address referrer
) internal returns (uint256 amountOut);
function _swapDeposit(
ICamelotV2Router router,
ICamelotPair pool,
IERC20 tokenIn,
uint256 saleAmt,
IERC20 opToken,
address referrer
) internal returns (uint256 lpAmount);
function _withdrawSwapDirect(
ICamelotPair pool,
ICamelotV2Router router,
uint256 amt,
IERC20 tokenOut,
IERC20 opToken,
address referrer
) internal returns (uint256 amountOut);
Get reserves sorted by known token:
(
uint256 knownReserve,
uint256 opposingReserve,
uint256 knownFeePercent,
uint256 opposingFeePercent
) = CamelotV2Service._sortReserves(pool, knownToken);
import {TestBase_CamelotV2} from "@crane/contracts/protocols/dexes/camelot/v2/test/bases/TestBase_CamelotV2.sol";
contract MyTest is TestBase_CamelotV2 {
function setUp() public override {
super.setUp();
// camelotV2Factory and camelotV2Router available
}
function test_swap() public {
// Create pair
address pair = camelotV2Factory.createPair(
address(tokenA),
address(tokenB)
);
// Add liquidity
CamelotV2Service._deposit(
camelotV2Router,
tokenA,
tokenB,
1000e18,
1000e18
);
// Execute swap
uint256 amountOut = CamelotV2Service._swap(
camelotV2Router,
ICamelotPair(pair),
100e18,
tokenA,
tokenB,
address(0)
);
}
}
Camelot uses swapExactTokensForTokensSupportingFeeOnTransferTokens to support deflationary tokens:
router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
amountIn,
amountOutMin,
path,
to,
referrer,
deadline
);
contracts/protocols/dexes/camelot/v2/
├── services/
│ └── CamelotV2Service.sol
├── CamelotV2RouterAwareRepo.sol
├── CamelotV2FactoryAwareRepo.sol
├── stubs/
│ ├── CamelotFactory.sol
│ ├── CamelotRouter.sol
│ ├── CamelotPair.sol
│ └── libraries/
│ ├── Math.sol
│ ├── SafeMath.sol
│ └── UniswapV2Library.sol
└── test/bases/
└── TestBase_CamelotV2.sol
references/camelot-services.md - Detailed patterns and examplesProject scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.