Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Deposit reward when adding new template #34

Conversation

TAdev0
Copy link
Contributor

@TAdev0 TAdev0 commented Apr 11, 2024

Resolves #30

@TAdev0 TAdev0 requested a review from b-j-roberts as a code owner April 11, 2024 21:29
@TAdev0 TAdev0 changed the title deposit reward when adding new template [feat]: deposit reward when adding new template Apr 11, 2024
@TAdev0 TAdev0 changed the title [feat]: deposit reward when adding new template [feat] Deposit reward when adding new template Apr 11, 2024
@TAdev0
Copy link
Contributor Author

TAdev0 commented Apr 11, 2024

@b-j-roberts here is a first draft.

Tests dont pass for now beause we need to deploy some mock erc20 contract in test to make the transfer work.

Can you give me more precisions, is anyone allowed to call add_template ? Should I add storage variables to keep track of template ids -> reward amount / reward token ?

@b-j-roberts
Copy link
Contributor

Can you give me more precisions, is anyone allowed to call add_template ? Should I add storage variables to keep track of template ids -> reward amount / reward token ?

Yes, anyone can call add_template no changes are needed other than depositing the reward token.
reward and reward_token are already defined within the TemplateMetadata, so there is no need to add extra variables or storage.

@b-j-roberts
Copy link
Contributor

Tests dont pass for now beause we need to deploy some mock erc20 contract in test to make the transfer work.

If you don't mind doing that as part of this PR, here is a decent ERC20 mock from another project. https://github.com/keep-starknet-strange/succinct-starknet/blob/main/src/mocks/erc20_mock.cairo

@TAdev0
Copy link
Contributor Author

TAdev0 commented Apr 12, 2024

@b-j-roberts sure i'll add test , was just waiting for precisions before implementing them

b-j-roberts and others added 10 commits April 12, 2024 10:31
* NFTs module, minting from the board, and color based pixel quests

* scarb fmt
* feat: display owner of selected pixel

* feat: removed console log

* Panel layout fix

---------

Co-authored-by: Brandon Roberts <[email protected]>
* ➕ add starknet dependencies

* ✨ add pixel data hashing

* Update Dockerfile to reflect change in go version

---------

Co-authored-by: Brandon Roberts <[email protected]>
* 👥 Add @Ayoazeez26 as a contributor

* 👥 Add @tekkac as a contributor
* Go formatting CI check

* Main.go formatted

* go format

* Change go module name to github repo and patched issue in integration scripts due to new init param
@TAdev0 TAdev0 closed this Apr 14, 2024
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.

[feat] Template ERC20 rewards deposit
4 participants