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

[Feature] Support Stacks Blockchain #3892

Open
friedger opened this issue Dec 2, 2023 · 5 comments · May be fixed by #3919
Open

[Feature] Support Stacks Blockchain #3892

friedger opened this issue Dec 2, 2023 · 5 comments · May be fixed by #3919

Comments

@friedger
Copy link

friedger commented Dec 2, 2023

Is your feature request related to a problem? Please describe.
As a Stx holder, I would like to send and receive stx. Ideally, I would be able to stack/stake my stx.

Describe the solution you'd like
The app should show the stx balance and let me receive and send stx.

Support for sip9 tokens would be the next step.

Describe alternatives you've considered
Use a different app 😭

Additional context
I can help developing, but need some guidance about the process.

@ByteZhang1024
Copy link
Contributor

You can refer to it first.
#3146

If there's anything you don't understand, or that method doesn't understand, I'll help you out.

@friedger
Copy link
Author

friedger commented Dec 7, 2023

@ByteZhang1024 What is the different between IEncodedTx and IDecodedTx? They are both structured objects.

@ByteZhang1024
Copy link
Contributor

IEncodedTx
It is generally defined in terms of different chains, usually transaction formats. It is primarily an object of direct flow within our internal business. e.g Everyone is familiar with ETH.

export type IEncodedTxEvm = {
  from: string;
  to: string;
  value: string;
  data?: string;
  customData?: string;
  nonce?: number | string;

  gas?: string;
  gasLimit?: string;
  gasPrice?: string;
  maxFeePerGas?: string;
  maxPriorityFeePerGas?: string;
};

IDecodedTx
Is a format we define for trading decode, which is used for various ui presentations. Transactions from any other chain can be converted into i decoded tx to display information on different business pages.
It can be converted from IEncodedTx
e.g https://github.com/OneKeyHQ/app-monorepo/blob/onekey/packages/engine/src/vaults/impl/evm/Vault.ts#L238

@friedger
Copy link
Author

friedger commented Dec 8, 2023

@ByteZhang1024 Thank you for the clarification.

How do you handle testnets? I see that create createClientFromURL does not take a testnet or chainid flag.

@ByteZhang1024
Copy link
Contributor

packages/shared/src/config/presetNetworks.ts
Looking at the format here, just add a test chain.

@friedger friedger linked a pull request Dec 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants