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: SDK methods update and tests #9

Open
wants to merge 5 commits into
base: development
Choose a base branch
from

Conversation

Astewart1510
Copy link
Contributor

SDK Methods

The following methods were updated:

  • Create DRT
  • Buy DRT
  • De-list DRT
  • List DRT
  • Join Data Pool as pending contributor
  • Claim Contributor Token
  • Redeem DRT

In every method there are transactions created to support each method. These transactions are found in the createTransactions folder. Each transaction is then sent calling functions from the sendTransactions folder.
For the method - Join Data Pool - an transaction is needed signed by the enclave to approve the pending contributor. To test this in a demonstration format, a dummy enclave account and transactions is created in the testing files. Without this we would not be able to test when a user is approved as a contributor and can claim the ownership of their contributor token.

Testing files were created using Jest to test these methods, one for the testnetwork and one for a local sandbox.

To Test

There are two ways to test this. You can test on the testnetwork or you can test using a local spun up algorand sandbox. I would advise using the local sandbox as it takes 4 seconds to get through all the transactions compared to the testnetwork which takes 150 seconds to get through all the transactions ( confirming at a rate of 4seconds per transaction).
For testnetwork run: npm run test-sdk sdk.test.ts
For sandbox run: npm run test-sdk sdk.sandbox.test.ts

@Astewart1510 Astewart1510 requested a review from jongbonga May 15, 2023 22:05
@netlify
Copy link

netlify bot commented May 15, 2023

Deploy Preview for ntc-web ready!

Name Link
🔨 Latest commit d58e30e
🔍 Latest deploy log https://app.netlify.com/sites/ntc-web/deploys/64638f0d398c970008ca80f3
😎 Deploy Preview https://deploy-preview-9--ntc-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Astewart1510 Astewart1510 marked this pull request as draft May 16, 2023 13:14
@Astewart1510 Astewart1510 marked this pull request as ready for review May 16, 2023 14:13
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.

1 participant