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

sam info includes fees #253

Merged
merged 2 commits into from
Jul 7, 2023
Merged

sam info includes fees #253

merged 2 commits into from
Jul 7, 2023

Conversation

vigneshka
Copy link
Collaborator

@vigneshka vigneshka commented Jul 6, 2023

support sam v1.1

create a consistent returned type for the data

renames arg in sam buy for clarity

@changeset-bot
Copy link

changeset-bot bot commented Jul 6, 2023

🦋 Changeset detected

Latest commit: 56ad51b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@soundxyz/sdk Major
@soundxyz/sdk-example Patch

Not sure what this means? Click here to learn what changesets are.

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

@vigneshka vigneshka force-pushed the vigneshka/sam-info-with-fees branch from 0f6e802 to 5f3fe55 Compare July 6, 2023 17:06
@@ -112,8 +114,7 @@ export async function SamBuy(
{ editionAddress }: SamEditionAddress,
{
quantity,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in our regular non-sam mint, we pass in sale schedule and quantity, and it calculates totalValue

here, price is confusing because you may think it means price per nft, since quantity is also an arg

clarifying it is maxTotalValue (calculated with the flat tx fee, and not have the percent platform fee for new sam)

@vigneshka vigneshka marked this pull request as ready for review July 6, 2023 17:26
@vigneshka vigneshka requested review from PabloSzx and saihaj and removed request for PabloSzx July 6, 2023 17:27
const samContract = SAM__factory.connect(samAddress, providerOrSigner)

const [info, platformFeeBPS] = await Promise.all([
samContract.samInfo(editionAddress),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

with viem refactor, this will be easier to consolidate into 1 network request

currently, this read function is not used in our FE, we index the data in our BE when an event comes in and serve from our api in SamConfig

@vigneshka vigneshka requested a review from PabloSzx July 6, 2023 17:34
.changeset/modern-monkeys-rest.md Outdated Show resolved Hide resolved
.changeset/modern-monkeys-rest.md Outdated Show resolved Hide resolved
@vigneshka vigneshka force-pushed the vigneshka/sam-info-with-fees branch from a23dff9 to 5f3fe55 Compare July 6, 2023 23:19
@vigneshka vigneshka requested a review from PabloSzx July 6, 2023 23:22
@vigneshka vigneshka merged commit bf991c8 into main Jul 7, 2023
2 checks passed
@vigneshka vigneshka deleted the vigneshka/sam-info-with-fees branch July 7, 2023 03:39
@github-actions github-actions bot mentioned this pull request Jul 7, 2023
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