innowacja2022-dapp-TTPSC/TTPSC-Rewards-DApp

Deploy Script (P1)

Closed this issue · 0 comments

Add .js script which deploy all contracts and move abi and addresses to frontend catalog.

Abi files and address are needed to map contract methods on frontend side.

For better understanding check deploy Token file and see which .json files are being moved and handling basic token operations in frontend files. Ethers docs could be useful https://docs.ethers.org/v5/api/contract/example/

I prepare some steps how it could look

  1. addrTTPSC = new Token()
  2. addrPay = new Payments(addrTTPSC)
  3. Then you have to transfer funds (tokens) from the original token address to the manager address - addrPay
  4. You create a contract addrRew = RewardsManager(addrPay)
  5. Then move the built files to the appropriate path in the frontend subfolder