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

Simplified fees and rewards #300

Merged
merged 5 commits into from
Dec 18, 2023
Merged

Conversation

Vectorized
Copy link
Collaborator

@Vectorized Vectorized commented Dec 17, 2023

Copy link

changeset-bot bot commented Dec 17, 2023

⚠️ No Changeset found

Latest commit: 7443da7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 1 package
Name Type
@soundxyz/sound-protocol Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -985,16 +959,16 @@ contract SuperMinterV1_1 is ISuperMinterV1_1, EIP712 {
function _validatePlatformFeeConfig(PlatformFeeConfig memory c) internal pure {
if (
LibOps.or(
LibOps.or(c.perTxFlat > MAX_PLATFORM_PER_TX_FLAT_FEE, c.perMintBPS > MAX_PLATFORM_PER_MINT_FEE_BPS),
LibOps.or(c.platformTxFlatFee > MAX_PLATFORM_PER_TX_FLAT_FEE, c.platformMintBPSFee > MAX_PLATFORM_PER_MINT_FEE_BPS),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nit, would call it platformMintFeeBPS instead.

f.finalArtistFee -= affiliateBPSFee;
f.finalAffiliateFee = affiliateBPSFee;
} else {
f.finalAffiliateFee = 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can skip the else. f.finalAffiliateFee is initialized to zero.

f.artistReward = c.thresholdArtistReward * uint256(quantity);
f.affiliateReward = c.thresholdAffiliateReward * uint256(quantity);
f.platformReward = c.thresholdPlatformReward * uint256(quantity);
f.finalPlatformFee = 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can skip the else. f.finalPlatformFee is initialized to zero.

@vigneshka vigneshka changed the title Vigneshka/nit Simplified fees and rewards Dec 17, 2023
@vigneshka vigneshka merged commit 9711ffc into vectorized/fee-changes-2 Dec 18, 2023
5 checks passed
@vigneshka vigneshka deleted the vigneshka/nit branch December 18, 2023 06:05
vigneshka added a commit that referenced this pull request Dec 18, 2023
* Implement fee changes

* T

* Fix prices and add tests

* Add tests

* Simplified fees and rewards (#300)

* nit suggestion

* changes

* Fix code and fuzz test

* Tidy

* Nit comment

---------

Co-authored-by: Vignesh Hirudayakanth <vigneshkanth@gmail.com>

---------

Co-authored-by: Vignesh Hirudayakanth <vigneshkanth@gmail.com>
vigneshka added a commit that referenced this pull request Dec 18, 2023
* Prep files

* Reinstall multicaller

* forge install: multicaller

v1.3.1

* Add LibMulticaller.senderOrSigner support

* Tidy

* freeMintIncentive -> cheapMintIncentive

* Add comment on the two types of affiliate fees

* Remove first collector incentives

* Add more comments and use checked math in mintTo

* Add finalAffiliateIncentive to Minted log. Change finalCheapMintFee -> finalCheapMintIncentive

* Add platform airdrop functionality to SuperMinterV1_1 (#298)

* Add presave functionality to SuperMinterV1_1

* Rename PRESAVE -> PLATFORM_AIRDROP

* Force PLATFORM_AIRDROP to only use platform signer

* Remove artist-customizable signer, everyone must use platform signer

* Make mintTo and platformAirdrop return fromTokenId, use airdrop in platformAirdrop

* Remove signer from MintData

* Update create2 deployment script

* Create modern-shirts-try.md

* pin version for typechain

* tweak ci

* more ci tweaks

* add back foundry

* bump

* bump typechain

* Implement fee changes (#299)

* Implement fee changes

* T

* Fix prices and add tests

* Add tests

* Simplified fees and rewards (#300)

* nit suggestion

* changes

* Fix code and fuzz test

* Tidy

* Nit comment

---------

Co-authored-by: Vignesh Hirudayakanth <vigneshkanth@gmail.com>

---------

Co-authored-by: Vignesh Hirudayakanth <vigneshkanth@gmail.com>

* Update modern-shirts-try.md

---------

Co-authored-by: Vignesh Hirudayakanth <vigneshkanth@gmail.com>
vigneshka added a commit that referenced this pull request Dec 18, 2023
* Clone files and bump versions

* SuperMinterV1_1 et al. (#296)

* Prep files

* Reinstall multicaller

* forge install: multicaller

v1.3.1

* Add LibMulticaller.senderOrSigner support

* Tidy

* freeMintIncentive -> cheapMintIncentive

* Add comment on the two types of affiliate fees

* Remove first collector incentives

* Add more comments and use checked math in mintTo

* Add finalAffiliateIncentive to Minted log. Change finalCheapMintFee -> finalCheapMintIncentive

* Add platform airdrop functionality to SuperMinterV1_1 (#298)

* Add presave functionality to SuperMinterV1_1

* Rename PRESAVE -> PLATFORM_AIRDROP

* Force PLATFORM_AIRDROP to only use platform signer

* Remove artist-customizable signer, everyone must use platform signer

* Make mintTo and platformAirdrop return fromTokenId, use airdrop in platformAirdrop

* Remove signer from MintData

* Update create2 deployment script

* Create modern-shirts-try.md

* pin version for typechain

* tweak ci

* more ci tweaks

* add back foundry

* bump

* bump typechain

* Implement fee changes (#299)

* Implement fee changes

* T

* Fix prices and add tests

* Add tests

* Simplified fees and rewards (#300)

* nit suggestion

* changes

* Fix code and fuzz test

* Tidy

* Nit comment

---------

Co-authored-by: Vignesh Hirudayakanth <vigneshkanth@gmail.com>

---------

Co-authored-by: Vignesh Hirudayakanth <vigneshkanth@gmail.com>

* Update modern-shirts-try.md

---------

Co-authored-by: Vignesh Hirudayakanth <vigneshkanth@gmail.com>

* Update .github/workflows/canary.yml

---------

Co-authored-by: Vectorized <webby1111@hotmail.com>
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.

None yet

2 participants