Skip to content

Conversation

@t-phoenix
Copy link
Collaborator

Smart Contract

  • QuestFactory: factory to create New Quest and keep track of deployed Quests
  • QuestDonation: Quest Contract keeps track of donation limit ($5000/year), and admin can allow ERC20 token donations, and must enable oracle contract for tokens.

For Native ETH: Use address(0) to allowToken and setPriceOracle

Script

  • Deploy.s.sol: Deploy Contracts, Setup First Quest, and Interact by Donating and withdrawing funds.
  • 1_DeployQuest: Deploys Quest factory and Quest Donation Contracts
  • 2_SetupQuest: Admin allows ETH and USDC for valid donations, and add oracle price feeds for the same
  • 3_InteractionQuest: Donate and Withdraw ETH/ USDC for sample function invokes

Test

  • QuestDonation.t.sol: Basic Testing around QuestDonationContract.

@leinss
Copy link
Collaborator

leinss commented Feb 9, 2025

Thanks for the PR.

There's the additional setup which has to happen somewhere, to allow tokens & set the price oracle.

That can go into the quest factory and be set once & read by each quest donation.

Would merge it though as is, and improve in next pr

@leinss leinss merged commit 068dc2c into etherguild:main Feb 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants