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

[@kadena/client-utils] Implement Marmalade functions - additions #1945

Conversation

wooglie
Copy link
Member

@wooglie wooglie commented Apr 8, 2024

This PR adds more functions and tests to #1484 PR.

The goal was to also make dynamic type errors so that while writing the functions you have feedback if you need to pass in some more data depending on the policies you're using.

Examples:
Base example without any policies
Screenshot 2024-04-08 at 11 34 46

If you use royalty concrete policy, it will ask you to provide royalty object:
Screenshot 2024-04-08 at 11 35 33
Screenshot 2024-04-08 at 11 35 45

And will restrain you from passing it if you're not using the royalty policy
Screenshot 2024-04-08 at 11 40 16

This is the happy path when using the royalty policy:
Screenshot 2024-04-08 at 11 36 09

If you use custom policies that require additional transaction data:
Screenshot 2024-04-08 at 11 40 37
Note: If you're using custom policies, be sure to pass in the data in the format you're expecting it on the pact side!

Copy link

changeset-bot bot commented Apr 8, 2024

⚠️ No Changeset found

Latest commit: 3acfc3a

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 no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

Copy link

vercel bot commented Apr 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
alpha-docs ✅ Ready (Inspect) Visit Preview May 3, 2024 1:59pm
proof-of-us ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2024 1:59pm
react-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2024 1:59pm
tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2024 1:59pm

@wooglie wooglie merged commit a0153c4 into feat/client-utils/marmalade-functions May 3, 2024
14 checks passed
@wooglie wooglie deleted the chore/client-utils/marmalade-functions-addition branch May 3, 2024 14:07
wooglie added a commit that referenced this pull request May 29, 2024
* add marmalade generate contract script

* create token and create token id functions

* small refactor to create token id and create token

* mint token functionality

* transfer-create function

* get balance function

* refactor createToken

* index file

* added unit testing for createId, create and mint tokens

* integration testing; lint and style fixes; index file for marmalade

* removed unecessary exports

* omit sign in dirty reads

* changeset file

* marmalade integration testing init

* make chain argument declared at top;

* ci changes: add apt-get update

* default chain 0

* unit testing to meet threshold

* lint fixes

* fix: minor fixes and comments resolutions

* fix: adjusted precision type from number to Pact Int

* fix: lint fixes

* chore: update the create token capability signature

* [@kadena/client-utils] Implement Marmalade functions - additions (#1945)

* chore: added more maramalade util functions

* chore: align create-token with other functions

* fix: linting issues

* chore: add update-uri function

* chore: format files

* [@kadena/client-utils] Implement Marmalade functions - Sale functions (#2055)

* chore: added more maramalade util functions

* chore: align create-token with other functions

* fix: linting issues

* feat: added sale functions and tests; chore: updated and cleaned read functions

* chore: linting

* chore: added script to setup test environment before executing integration tests

* chore: lint setup marmalade test env file

* chore: gnerate marmalade-v2.policy-manager types

* chore: check if conventional and dutch auction have been whitelisted

* chore: remove whitelisting sale from test setup script

* chore: wait for block time helper function

* chore: fix lint issue

* chore: enforce failure uri guard if not updatable when using guard policy

* chore: rename config to updatableURI

* chore: remove guard on local calls

* feat: added collection-policy functions

* chore: adjust the auction end date in tests

* chore: cleanup and stability improvements

* fix: more time

* chore: simplify local call functions

* chore: linting

* chore: get quote function and reorganize imports (#2187)

---------

Co-authored-by: Ivan Magaš <imagas96@gmail.com>
jermaine150 added a commit that referenced this pull request May 30, 2024
* add marmalade generate contract script

* create token and create token id functions

* small refactor to create token id and create token

* mint token functionality

* transfer-create function

* get balance function

* refactor createToken

* index file

* added unit testing for createId, create and mint tokens

* integration testing; lint and style fixes; index file for marmalade

* removed unecessary exports

* omit sign in dirty reads

* changeset file

* marmalade integration testing init

* make chain argument declared at top;

* ci changes: add apt-get update

* default chain 0

* unit testing to meet threshold

* lint fixes

* fix: minor fixes and comments resolutions

* fix: adjusted precision type from number to Pact Int

* fix: lint fixes

* chore: update the create token capability signature

* [@kadena/client-utils] Implement Marmalade functions - additions (#1945)

* chore: added more maramalade util functions

* chore: align create-token with other functions

* fix: linting issues

* chore: add update-uri function

* chore: format files

* add marmalade-marketplace app

* add header, create-token pages and components

* feat: indexer

* Connection with Spirekey (#2155)

* Updated layout

* Rename pages folder to lowercase

* Added basic spirekey connection

* feat: indexer

* Added basic spirekey connection

* Temporarily adding chainid to env

* Removed chainid from spirekey since we're chain agnostic

* Display account address in Header

---------

Co-authored-by: Ivan Magaš <imagas96@gmail.com>

* feat: index sales and bids (#2157)

* feat: index sales and bids

* chore: do not save events to database

* feat: landing page (#2172)

* feat: index sales and bids

* chore: do not save events to database

* feat: landing page

* chore: remove events hook

* chore: remove double main wrapper class

* chore: rename example to home and remove example page

* Undo change

* Fixed dependencies

* Fixed dependencies

* Updated pnpm lockfile

* Updated pnpm lockfile

* Fixed getTokenInfo call

* Cleaned public folder and Readme

---------

Co-authored-by: Nil Amrutlal <nil.amrutlal@deptagency.com>
Co-authored-by: Ivan Magaš <imagas96@gmail.com>
Co-authored-by: ggobugi27 <ggobugi27@github.com>
jermaine150 added a commit that referenced this pull request Jun 12, 2024
* add marmalade generate contract script

* create token and create token id functions

* small refactor to create token id and create token

* mint token functionality

* transfer-create function

* get balance function

* refactor createToken

* index file

* added unit testing for createId, create and mint tokens

* integration testing; lint and style fixes; index file for marmalade

* removed unecessary exports

* omit sign in dirty reads

* changeset file

* marmalade integration testing init

* make chain argument declared at top;

* ci changes: add apt-get update

* default chain 0

* unit testing to meet threshold

* lint fixes

* fix: minor fixes and comments resolutions

* fix: adjusted precision type from number to Pact Int

* fix: lint fixes

* chore: update the create token capability signature

* [@kadena/client-utils] Implement Marmalade functions - additions (#1945)

* chore: added more maramalade util functions

* chore: align create-token with other functions

* fix: linting issues

* chore: add update-uri function

* chore: format files

* add marmalade-marketplace app

* add header, create-token pages and components

* feat: indexer

* Connection with Spirekey (#2155)

* Updated layout

* Rename pages folder to lowercase

* Added basic spirekey connection

* feat: indexer

* Added basic spirekey connection

* Temporarily adding chainid to env

* Removed chainid from spirekey since we're chain agnostic

* Display account address in Header

---------

Co-authored-by: Ivan Magaš <imagas96@gmail.com>

* Adding nvmrc to gitignore

* WIP

* My tokens page and replaced axios with fetch

* Undo changes to policy-config

---------

Co-authored-by: Nil Amrutlal <nil.amrutlal@deptagency.com>
Co-authored-by: Ivan Magaš <imagas96@gmail.com>
Co-authored-by: ggobugi27 <ggobugi27@github.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.

3 participants