Solidity Smart Contracts: Tokens and Marketplace
A set of Solidity smart contracts written and tested with Foundry across two
courses of the curriculum, covering token issuance, an on-chain marketplace, and weighted
governance voting. Each contract was compiled, deployed to a local chain and exercised through
Foundry's test suite (forge test).
Context
Two separate courses contributed contracts to this body of work: blockchain security in the M1 curriculum (March 2025) and a blockchain module in Bachelor 3. Both used Solidity with the Foundry toolchain (forge, tests, scripts) rather than Remix, to practice a real compile/test/deploy workflow.
What was built
- A custom ERC20 token with an owner/admin system and paid minting (1 ETH mints a fixed
token amount), including custom error handling (
HILALO.sol). - An on-chain marketplace contract: item listing/creation and purchase paid in the
ERC20 token, plus a small coin-flip mini-game (
Marketplace.sol). - A weighted voting contract from the Bachelor 3 coursework: voting power proportional
to token holdings, with
Voter/Proposalstructures (voting.sol). - Additional ERC20 variants built on OpenZeppelin's implementation for comparison (owner-restricted mint vs. no access control).
- Unit tests written and run through Foundry's
forge test.
Tech stack
Status
All contracts completed, tested and submitted across both courses.