Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Approve for pool minting#56

Merged
zomglings merged 3 commits intomainfrom
approve-for-pool-minting
Jul 6, 2022
Merged

Approve for pool minting#56
zomglings merged 3 commits intomainfrom
approve-for-pool-minting

Conversation

@Yhtiyar
Copy link
Copy Markdown
Contributor

@Yhtiyar Yhtiyar commented Jul 6, 2022

Changes

How to test these changes?

Now approveForPool grants minting permission

Related issues

@Yhtiyar Yhtiyar requested a review from zomglings July 6, 2022 14:55
@zomglings
Copy link
Copy Markdown
Member

zomglings commented Jul 6, 2022

@bugout-dev check

  • Every public/external method that calls _mint should have an isApprovedForPool check (git grep _mint).
  • Tests for mint, mintBatch, poolMintBatch as approved operator
  • Tests for mint, mintBatch, poolMintBatch as pool controller
  • Tests for mint, mintBatch, poolMintBatch as unapproved operator

Copy link
Copy Markdown
Member

@zomglings zomglings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gg

Ran tests and tests passing.

Comment thread dao/test_terminus.py
)

final_pool_supply = self.diamond_terminus.terminus_pool_supply(pool_id)
self.assertEqual(final_pool_supply, initial_pool_supply + num_accounts)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial_pool_supply + sum(target_amounts) would be a better implementation here.

Comment thread dao/test_terminus.py
self.diamond_terminus.approve_for_pool(
pool_id, accounts[3], {"from": accounts[1]}
)
with self.assertRaises(Exception):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests for unapproved operators are doing as part of the approval tests. This is fine.

@zomglings zomglings merged commit ac431c9 into main Jul 6, 2022
@zomglings zomglings deleted the approve-for-pool-minting branch July 6, 2022 17:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants