A TypeScript SDK for interacting with the Medici Token ecosystem, enabling seamless token transfers with integrated fee mechanisms for educational platforms.
The Medici Contract SDK provides a simple interface for interacting with two main smart contracts:
CustomToken: An ERC20 token contract for the Medici Token (MDC)TokenTransferWithFee: A contract that handles token transfers with a 5% platform fee
- ERC20 token management (Medici Token - MDC)
- Fee-based transfer system (95% to recipient, 5% to platform)
- TypeScript wrappers for easy integration
- Built on ethers.js for reliable Ethereum interactions
- Hardhat-based development and deployment framework
npm install medici-contract-sdkimport { approveMediciToken } from 'medici-contract-sdk';
await approveMediciToken(
provider,
tokenAddress,
spenderAddress,
amount
);import { sendWithFee } from 'medici-contract-sdk';
await sendWithFee(
provider,
transferContractAddress,
studentAddress,
amount
);- Standard ERC20 implementation
- Mintable by owner
- Name: Medici Token
- Symbol: MDC
- Decimals: 18
- Handles token transfers with automatic fee distribution
- 5% platform fee on all transfers
- 95% goes to the recipient
- Emits detailed transfer events
# Install dependencies
npm install
# Compile contracts
npx hardhat compile
# Run tests
npx hardhat test
# Deploy contracts
npx hardhat run scripts/deploy.ts├── contracts/ # Smart contract source files
├── src/ # TypeScript SDK source
│ ├── abi/ # Contract ABIs
│ └── wrappers/ # TypeScript contract wrappers
├── scripts/ # Deployment and utility scripts
└── ignition/ # Hardhat Ignition deployment modules
MIT
Contributions are welcome! Please feel free to submit a Pull Request.