Redeem XL ERC20 token with point rewards to achieve value circulation
node v16.14.0
npm v7.24.2
[install nvm & node]
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install 16.14.0
nvm use 16.14.0
[install npm]
npm install [email protected] -gnpm i @openzeppelin/hardhat-upgrades
npm install --save-dev @nomicfoundation/hardhat-ethers ethersnpx hardhat compilenpx hardhat testIf there is no change in the implementation, then every time this script is executed, the proxy contract address will change
npx hardhat deployXL --network erbieTestNetnpx hardhat deployL --network erbieTestNetNote that a network must be established. If it is for testing, NPX hard hat node can be used, and then -- network localhost Otherwise, you will encounter this error. Don't look like an ERC 1967 proxy with a logical contract address Contract upgrade, there will be a delay in hre.upgrades.erc1967. getImplementeAddress
npx hardhat upgrade --proxyaddr <proxy addr> --network erbieTestNet
npx hardhat upgradeL --proxyaddr <proxy addr> --network erbieTestNet## grant xl
npx hardhat addXLWhiteList --addr <addr> --network erbieTestNet
## grant l
npx hardhat addLWhiteList --addr <addr> --network erbieTestNetnpx hardhat claimxl --recipient --amt --network erbieTestNet