Loading...
Loading...
Solidity smart contract development workflow. Use when modifying smart contracts in apps/eth-contracts/contracts/.
npx skill4agent add hiromaily/go-crypto-wallet solidity-developmentapps/eth-contracts/git-workflow| Path | Description |
|---|---|
| Smart contract source files |
| Foundry deployment scripts |
| Foundry test files ( |
| Tool | Version | Role |
|---|---|---|
Foundry ( | 1.6.0-nightly | Compile, test, deploy |
| Solidity | | Smart contract language |
| OpenZeppelin Contracts | | ERC-20 / standard base contracts |
| bun | primary | npm package manager |
| solhint | | Solidity linter |
| dprint | | JS/TS formatter |
Note:is installed atforge(may not be in PATH). Run with full path or add~/.foundry/bin/forgeto~/.foundry/bin.PATH
cd apps/eth-contracts
# 1. Install forge-std (Foundry testing/scripting library)
forge install foundry-rs/forge-std
# 2. Install npm dependencies (@openzeppelin/contracts, solhint, dprint)
bun installcd apps/eth-contracts
forge build # Compile all contracts (artifacts → out/)
forge test -v # Run Foundry unit tests
bun run lint # Solidity lint via solhint (must exit 0, zero errors)
bun run fmt # Format JS/TS files via dprint (must exit 0)cd apps/eth-contracts
export PRIVATE_KEY=0x<deployer-private-key>
forge script script/DeployHYC.s.sol --rpc-url http://localhost:8545 --broadcast
# → outputs contract address, tx hash, gas usageanvilgethhttp://localhost:8545import {Foo} from "..."@title@author@notice@param.env.gitignoretest/*.t.solforge testbun run lint# 1. Compile
cd apps/eth-contracts
forge build
# 2. Regenerate Go bindings (if target ABI changed)
make gen-abianvilgethhttp://localhost:8545git-workflowgithub-issue-creation