Upgrade-ready Solidity project for 3sendxyz. It currently ships two upgradeable payment/burn managers plus supporting mocks and tests.
- Hardhat with TypeScript tooling
- OpenZeppelin Contracts (core + upgradeable variants)
- Hardhat Upgrades plugin for deploying and upgrading UUPS proxies
Manager3send: multi-tier UUPS upgradeable contract that prices uploads off a Uniswap V2 R1/USDC pool and burns the required R1 amount viatransferPayment. Four pricing tiers (Micro, Standard, Big, Archive) are stored on-chain and can be updated by the owner.R1TokenMock,UniswapMockPair,UniswapMockRouter: lightweight mocks used inside the test suite to emulate tokens and Uniswap V2 behaviour.
npm installnpx hardhat compilenpx hardhat test- Fill
.envwith the token addresses, pair address, and tier prices (values are interpreted as USDC amounts with 6 decimals, e.g.0.10for $0.10). SetVERIFY_ON_DEPLOY=true(plusETHERSCAN_API_KEY) if you want automatic Basescan verification. - Run the deployment script:
npx hardhat run --network <network> scripts/deploy.ts- Set
MANAGER_PROXY_ADDRESSin.env(andVERIFY_ON_UPGRADE=trueif you want to auto-verify the new implementation). - Deploy the new implementation with:
npx hardhat run --network <network> scripts/upgrade.tsCopy .env.example to .env and fill network credentials when you are ready to run deployments against testnets or mainnet.
@software{butusina2025_3sendxyz_smart_contract,
author = {Butusina, Petrica and Defranceschi, Alessandro},
title = {{3sendxyz SC}: End-to-end encrypted, decentralized file transfer Smart Contract},
year = {2025},
url = {https://github.com/3lemmalabs/3sendxyz-sc},
organization = {3lemma Labs},
note = {Software library}
}