Generate TypeScript deployment scripts for Aztec contracts with fee payment configuration. Use when deploying contracts, setting up deployment pipelines, or configuring fee payment methods.
/plugin marketplace add critesjosh/aztec-claude-plugin/plugin install critesjosh-aztec@critesjosh/aztec-claude-pluginThis skill is limited to using the following tools:
deploy-script.mdenvironment-config.mdfee-payment.mdGenerate production-ready TypeScript deployment scripts for Aztec smart contracts.
Navigate to the appropriate section based on your task:
import { MyContract } from "../src/artifacts/MyContract.js";
import { Logger, createLogger } from "@aztec/aztec.js/log";
import { SponsoredFeePaymentMethod } from "@aztec/aztec.js/fee/testing";
import { setupWallet } from "../src/utils/setup_wallet.js";
import { getSponsoredFPCInstance } from "../src/utils/sponsored_fpc.js";
import { SponsoredFPCContract } from "@aztec/noir-contracts.js/SponsoredFPC";
import { deploySchnorrAccount } from "../src/utils/deploy_account.js";
import { getTimeouts } from "../config/config.js";
async function main() {
const logger = createLogger('aztec:deploy');
// 1. Setup wallet connection
const wallet = await setupWallet();
// 2. Setup sponsored fee payment
const sponsoredFPC = await getSponsoredFPCInstance();
await wallet.registerContract(sponsoredFPC, SponsoredFPCContract.artifact);
const paymentMethod = new SponsoredFeePaymentMethod(sponsoredFPC.address);
// 3. Deploy account (or use existing)
const account = await deploySchnorrAccount(wallet);
// 4. Deploy contract
const contract = await MyContract.deploy(wallet, account.address).send({
from: account.address,
fee: { paymentMethod }
}).deployed({ timeout: getTimeouts().deployTimeout });
logger.info(`Contract deployed at: ${contract.address}`);
}
main().catch(console.error);
// Wallet and node connection
import { createAztecNodeClient } from '@aztec/aztec.js/node';
import { TestWallet } from '@aztec/test-wallet/server';
// Account management
import { Fr, GrumpkinScalar } from "@aztec/aztec.js/fields";
import { AccountManager } from "@aztec/aztec.js/wallet";
import { AztecAddress } from "@aztec/stdlib/aztec-address";
// Fee payment
import { SponsoredFeePaymentMethod } from "@aztec/aztec.js/fee/testing";
import { SponsoredFPCContract } from "@aztec/noir-contracts.js/SponsoredFPC";
// Logging
import { Logger, createLogger } from "@aztec/aztec.js/log";
For detailed API documentation and latest deployment patterns, use Context7:
Library ID: /aztecprotocol/aztec-packages
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.