- RewardToken deployed to: 0x1E80aF95e3FA22CBCC9860602Efc81f937031231
- NFTToken deployed to: 0xF204248E964Cf9Dc7De9C3670A6BF68506472813
- Proxy deployed to: 0x252b4AE2eA4993C72574AC24E9725F656eC50B42
- NFTStaking deployed to: 0xc2147115dE66887eA226F5a0b5a617EF62b1fe73
This contract allows users to stake NFTs and earn ERC20 rewards. The contract supports upgradeability using the UUPS pattern.
- Stake and unstake NFTs.
- Claim ERC20 rewards.
- Configurable reward rate, unbonding period, and claim delay.
- Pausable contract.
- Upgradeable using the UUPS pattern.
- Clone the repository.
- Install dependencies:
npm install
- Configure the deployment script in
scripts/deploy.js
. - Run the deployment script:
npx hardhat run scripts/deploy.js --network <network-name>
- Run tests:
npx hardhat test
-
Use Hardhat console to interact with the contract:
npx hardhat console --network <network-name>
-
Example interaction:
const NFTStaking = await ethers.getContractFactory("NFTStaking"); const staking = await NFTStaking.attach("<deployed-address>"); await staking.stake([1, 2, 3]);
This project is licensed under the MIT License.