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: sip30 stx call contract #6060

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

fbwoolf
Copy link
Contributor

@fbwoolf fbwoolf commented Jan 15, 2025

Try out Leather build cc94eadExtension build, Test report, Storybook, Chromatic

This PR adds SIP-30 stx_callContract.

@fbwoolf fbwoolf requested a review from kyranjamie January 15, 2025 20:38
@fbwoolf fbwoolf force-pushed the feat/sip30-stx-call-contract branch from cfbdac1 to 776025f Compare January 15, 2025 20:39
@fbwoolf fbwoolf force-pushed the feat/sip30-stx-call-contract branch 5 times, most recently from d96b11b to c8db26a Compare February 5, 2025 18:05
@fbwoolf fbwoolf marked this pull request as ready for review February 5, 2025 18:15
result: {
txid: '', // Broadcast transaction?
transaction: signedTransaction.serialize(),
} as any, // Fix this
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Trying to figure out why there is a type error here on txid.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Speaking with Jannik, by this helper method should broadcast. If apps want a tx that isn't broadcast, they should use stx_signTransaction

@fbwoolf fbwoolf force-pushed the feat/sip30-stx-call-contract branch 2 times, most recently from 2905ef5 to 4db5dc9 Compare February 5, 2025 21:06
export function getStxDefaultMessageParamsToTransactionRequest(params: RpcParameter) {
if (isUndefined(params)) return;

const transactionRequest = {} as any;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be a Partial<ActualType>?

Copy link
Collaborator

@kyranjamie kyranjamie left a comment

Choose a reason for hiding this comment

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

Great work @fbwoolf—think we need to add the broadcast flow too though

Comment on lines +103 to +105
if (isCancelTransaction) return toast.success('Transaction cancelled successfully');
if (isIncreaseFeeTransaction) return toast.success('Fee increased successfully');
return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not necessary to refactor now, but ideally these actions would be passed in to the hook

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, agree, this hook is hard to work with atm.

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