This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.
Try running some of the following tasks:
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts
yarn hardhat deploy --network {desiredNetwork}
The Erc20Upgreadable
contract was updated in order to accomodate for 2 new functions, both related to the
Rebalance functionalities
-- TreasuryTransfer : Transfers the fee amount collected to the tokenFcatory contract so that the contract will hold it for 1 rebalance interval before crediting it to the treasury address
This function allows the transfer of the fee amount without using mint
-- BalanceAdjust: Adjusts the balance of a user after rebalance is applied according to the new numbers provided by Ding's formula after deducting possible mgmt fees. Again no minting/burning is
required
Hence both functions help to keep the totalSupply accurate.
yarn hardhat run --network xxxx scripts/deployFactory.ts
, if the PK is not fresh, we might want to choose a higher nonce, we can edit the script itselfVanitySalt.ts
yarn hardhat run --network localhost scripts/vanitySalt.ts
yarn hardhat run --network localhost scripts/deploymentScript.ts
yarn hardhat run --network sepolia scripts/deploymentScript.ts
/
yarn hardhat run --network localhost scripts/deploymentScript-wrapped.ts-- Wrappers should be deployed at last
-- Upgrading contracts use : yarn hardhat run --network sepolia scripts/utils/deployUpgrades.ts
{ "tokenFactory": { "proxyAddress": "0xd3371c8cE3Bf5efd2777226071ed4f3b0655d33f", "saltStr": "264" }, "SmartTokenX": { "proxyAddress": "0xD3CaD0B22ED0E5fdc05c5cb5f2533b113B29EDF3", "saltStr": "340" }, "SmartTokenY": { "proxyAddress": "0xd3fEa8aa1075E11947427BE0f6BED1B57992F88D", "saltStr": "368" }, "Orchestator": { "proxyAddress": "0xD34A536885c4Bf938E5cEc06d1e1F4Ab28a024c9", "saltStr": "607" } }