Overview
A comprehensive token project template with four production-grade contracts covering the full token lifecycle: creation, distribution via vesting, yield via staking, and secure management via multisig.Quick Start
Generated Files
my-token
dokrypt.yaml
foundry.toml
README.md
contracts
token
ManagedToken.sol
vesting
VestingSchedule.sol
staking
StakeRewards.sol
multisig
MultiSig.sol
test
token
ManagedToken.t.sol
vesting
VestingSchedule.t.sol
staking
StakeRewards.t.sol
multisig
MultiSig.t.sol
scripts
deploy-token.js
setup-vesting.js
Contracts
ManagedToken.sol
Full-featured ERC-20 with owner-controlled minting, burning, and emergency pause. Constructor:
Events:
Transfer, Approval, Paused, Unpaused, OwnershipTransferred
VestingSchedule.sol
Linear token vesting with configurable cliff and duration. Constructor:
Vesting Logic:
- Before cliff: 0 tokens are vested
- After cliff: tokens vest linearly over the remaining duration
- Formula:
vestedAmount = totalAmount * (currentTime - start) / duration
ScheduleCreated, TokensReleased, ScheduleRevoked
StakeRewards.sol
Synthetix-style proportional staking rewards. Users stake tokens and earn rewards proportional to their share of the total stake. Constructor:
Reward Calculation:
rewardRate = rewardAmount / durationrewardPerToken += rewardRate * timeDelta / totalStakedearned = stakedBalance * (rewardPerToken - userPaidPerToken) + storedRewards
Staked, Withdrawn, RewardPaid, RewardsDurationUpdated
MultiSig.sol
M-of-N multisignature wallet for secure fund management. Constructor:_owners: Array of owner addresses_required: Minimum confirmations needed to execute
Events:
Deposit, Submission, Confirmation, Revocation, Execution, ExecutionFailure
The wallet accepts ETH via the receive() function, emitting a Deposit event.