# Blockchain Development Solidity

> Use when developing blockchain and Solidity smart contracts.

- Skill: `loopyluci/blockchain-development-solidity` (Agent Skill)
- Install (CLI): `npx skillmds@latest add loopyluci/blockchain-development-solidity`
- Raw SKILL.md: https://api.skillmd.com/api/skills/loopyluci/blockchain-development-solidity/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: LoopyLuci (https://skillmd.com/u/loopyluci)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/loopyluci/blockchain-development-solidity

---


# Blockchain and Solidity Development

Developing smart contracts on Ethereum-compatible blockchains — from Solidity fundamentals and contract patterns through security, gas optimization, and deployment.

## When to Use

- Writing and deploying Ethereum smart contracts
- Building DeFi, NFT, or token applications
- Auditing contract security
- Optimizing gas costs

## Solidity Patterns

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract TokenVault {
    mapping(address => uint256) public balances;
    event Deposited(address indexed user, uint256 amount);
    
    // Reentrancy guard pattern
    bool private _locked;
    modifier noReentrant() {
        require(!_locked, "Reentrancy");
        _locked = true;
        _;
        _locked = false;
    }
    
    function deposit() external payable {
        balances[msg.sender] += msg.value;
        emit Deposited(msg.sender, msg.value);
    }
    
    function withdraw(uint256 amount) external noReentrant {
        require(balances[msg.sender] >= amount, "Insufficient balance");
        balances[msg.sender] -= amount;
        (bool ok, ) = msg.sender.call{value: amount}("");
        require(ok, "Transfer failed");
    }
}
```

## Verification Checklist

- [ ] Contract follows checks-effects-interactions pattern
- [ ] Reentrancy guard on external calls
- [ ] Access control (Ownable, RBAC) implemented
- [ ] Integer overflow protection (Solidity 0.8+ has built-in)
- [ ] Gas optimization (pack structs, use events, avoid loops)
- [ ] Contract verified on Etherscan/block explorer
- [ ] Audit by third-party firm (for production contracts)
- [ ] Test coverage (Hardhat/Foundry) for all functions

