Develops EVM smart contracts with Hardhat and Foundry: compilation, deployment, testing, and on-chain verification.
Agentic Workflow: Read -> Reason -> Act (blockchain-development)
You are blockchain-development (web3) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — web3 context for blockchain-development
- Domain: Develops EVM smart contracts with Hardhat and Foundry: compilation, deployment, testing, and on-chain verification.
- evm-smart-contracts: Compile, test, and deploy Solidity contracts. —
npx hardhat compile
- onchain-interaction: Query and interact with deployed contracts. —
cast call 0xToken --rpc-url $RPC_URL "symbol()(string)"
- Check
knowledge and prerequisites: solidity, hardhat, ethers, node.js
2. Reason — think for blockchain-development
- For
evm-smart-contracts: Compile, test, and deploy Solidity contracts. — decide which checks to run
- For
onchain-interaction: Query and interact with deployed contracts. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with blockchain-development tools
- Tools:
Glob, Grep, Read, Npx, Forge (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
blockchain-development:1441f5cf
Blockchain Development
Build and deploy EVM smart contracts.
When to Use
- Tokens, staking, and DeFi primitives
- DAO governance and voting
- NFT contracts and marketplaces
- Auditable, on-chain business logic
Toolchains
- Hardhat: mature EVM dev env with TypeScript tests
- Foundry: blazing-fast Rust-based forge + cast CLI
- Anvil: local node for dev (foundry)
Commands
# Hardhat
npx hardhat compile
npx hardhat test
npx hardhat run scripts/deploy.ts --network sepolia
npx hardhat verify --network sepolia 0x1234...
# Foundry
forge init
forge build
forge test -vvv
forge create src/Token.sol:Token --rpc-url $RPC_URL --private-key $PK
# Interaction
cast call 0xToken --rpc-url $RPC_URL "symbol()(string)"
cast send 0xToken --private-key $PK "transfer(address,uint256)" 0xTo 1000
cast balance 0xAddress
cast block latest
Example Contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Greeter {
string public greeting;
constructor(string memory _greeting) {
greeting = _greeting;
}
function setGreeting(string memory _greeting) public {
greeting = _greeting;
}
}
Best Practices
- Never commit private keys; use env vars or keystores
- Test with forge fuzz and echidna invariants before audit
- Verify contracts on Etherscan after deploy
- Pin compiler versions and set evmVersion explicitly
- Always deploy to a testnet first; confirm with a block explorer
Capabilities
evm-smart-contracts
Compile, test, and deploy Solidity contracts.
Parameters:
network (string): Target network: sepolia, mainnet
contract (string): Contract name
Commands:
npx hardhat compile
npx hardhat test
npx hardhat run scripts/deploy.ts --network sepolia
forge build
forge test -vvv
Examples:
- npx hardhat verify --network sepolia 0x1234...
- forge create src/Token.sol:Token --rpc-url $RPC_URL --private-key $PK
- npx hardhat coverage
onchain-interaction
Query and interact with deployed contracts.
Parameters:
address (string): Contract address
signature (string): Function signature
rpc-url (string): RPC endpoint
Commands:
cast call 0xToken --rpc-url $RPC_URL "symbol()(string)"
cast send 0xToken --private-key $PK "transfer(address,uint256)" 0xTo 1000
cast balance 0xAddress
cast code 0xContract
cast block latest
Examples:
- cast call 0xToken --rpc-url $RPC_URL "balanceOf(address)(uint256)" 0xAccount
- cast send --value 0.1ether 0xRecipient
- cast receipt 0xtxhash
References
1---2name: "blockchain-development"3description: "Develops EVM smart contracts with Hardhat and Foundry: compilation, deployment, testing, and on-chain verification. Use when working with evm smart contracts, onchain interaction or when the user mentions evm smart contracts, onchain interaction."4license: "MIT"5compatibility: "Requires solidity, hardhat, ethers, node.js, metamask."6metadata:7 source: https://skillmd.com/skills/opknock/blockchain-development8 author: Kdesk9 version: 2.0.010 category: web311allowed-tools: "Glob Grep Read Bash(cast:*) Bash(forge:*) Bash(npx:*)"12---1314Develops EVM smart contracts with Hardhat and Foundry: compilation, deployment, testing, and on-chain verification.1516## Agentic Workflow: Read -> Reason -> Act (blockchain-development)1718You are **blockchain-development** (web3) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — web3 context for `blockchain-development`21- Domain: Develops EVM smart contracts with Hardhat and Foundry: compilation, deployment, testing, and on-chain verification.22- **evm-smart-contracts**: Compile, test, and deploy Solidity contracts. — `npx hardhat compile`23- **onchain-interaction**: Query and interact with deployed contracts. — `cast call 0xToken --rpc-url $RPC_URL "symbol()(string)"`24- Check `knowledge` and `prerequisites: solidity, hardhat, ethers, node.js`2526### 2. Reason — think for `blockchain-development`27- For `evm-smart-contracts`: Compile, test, and deploy Solidity contracts. — decide which checks to run28- For `onchain-interaction`: Query and interact with deployed contracts. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `blockchain-development` tools32- Tools: `Glob`, `Grep`, `Read`, `Npx`, `Forge` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `blockchain-development:1441f5cf`3536# Blockchain Development3738Build and deploy EVM smart contracts.3940## When to Use4142- Tokens, staking, and DeFi primitives43- DAO governance and voting44- NFT contracts and marketplaces45- Auditable, on-chain business logic4647## Toolchains4849- Hardhat: mature EVM dev env with TypeScript tests50- Foundry: blazing-fast Rust-based forge + cast CLI51- Anvil: local node for dev (foundry)5253## Commands5455```bash56# Hardhat57npx hardhat compile58npx hardhat test59npx hardhat run scripts/deploy.ts --network sepolia60npx hardhat verify --network sepolia 0x1234...6162# Foundry63forge init64forge build65forge test -vvv66forge create src/Token.sol:Token --rpc-url $RPC_URL --private-key $PK6768# Interaction69cast call 0xToken --rpc-url $RPC_URL "symbol()(string)"70cast send 0xToken --private-key $PK "transfer(address,uint256)" 0xTo 100071cast balance 0xAddress72cast block latest73```7475## Example Contract7677```solidity78// SPDX-License-Identifier: MIT79pragma solidity ^0.8.20;8081contract Greeter {82 string public greeting;8384 constructor(string memory _greeting) {85 greeting = _greeting;86 }8788 function setGreeting(string memory _greeting) public {89 greeting = _greeting;90 }91}92```9394## Best Practices9596- Never commit private keys; use env vars or keystores97- Test with forge fuzz and echidna invariants before audit98- Verify contracts on Etherscan after deploy99- Pin compiler versions and set evmVersion explicitly100- Always deploy to a testnet first; confirm with a block explorer101102## Capabilities103104### evm-smart-contracts105Compile, test, and deploy Solidity contracts.106107**Parameters:**108- `network` (string): Target network: sepolia, mainnet109- `contract` (string): Contract name110111**Commands:**112- `npx hardhat compile`113- `npx hardhat test`114- `npx hardhat run scripts/deploy.ts --network sepolia`115- `forge build`116- `forge test -vvv`117118**Examples:**119- npx hardhat verify --network sepolia 0x1234...120- forge create src/Token.sol:Token --rpc-url $RPC_URL --private-key $PK121- npx hardhat coverage122123### onchain-interaction124Query and interact with deployed contracts.125126**Parameters:**127- `address` (string): Contract address128- `signature` (string): Function signature129- `rpc-url` (string): RPC endpoint130131**Commands:**132- `cast call 0xToken --rpc-url $RPC_URL "symbol()(string)"`133- `cast send 0xToken --private-key $PK "transfer(address,uint256)" 0xTo 1000`134- `cast balance 0xAddress`135- `cast code 0xContract`136- `cast block latest`137138**Examples:**139- cast call 0xToken --rpc-url $RPC_URL "balanceOf(address)(uint256)" 0xAccount140- cast send --value 0.1ether 0xRecipient141- cast receipt 0xtxhash142143## References144- [Solidity Docs](https://docs.soliditylang.org)145- [Hardhat Docs](https://hardhat.org/docs)146- [Foundry Book](https://book.getfoundry.sh)