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

Add a callback to Safe deployment #188

Merged
merged 5 commits into from
Apr 4, 2022
Merged

Conversation

germartinez
Copy link
Member

What it solves

Adds a callback to the deploySafe method in the SafeFactory class.

This callback receives as a parameter the tcxHash of the deployment transaction, allowing to track the transaction outside of the SDK, in parallel, meanwhile the deployment is being executed.

const callback = (txHash: string): void => {
  console.log({ txHash })
}

const safeFactory = await SafeFactory.create({ ethAdapter })

const deploySafeProps: DeploySafeProps = { safeAccountConfig, callback }
const safe = await safeFactory.deploySafe(deploySafeProps)

@germartinez germartinez requested a review from usame-algan April 4, 2022 11:21
@github-actions
Copy link

github-actions bot commented Apr 4, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@germartinez germartinez requested a review from iamacook April 4, 2022 12:06
Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

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

Very nice 💯

@germartinez germartinez merged commit 753229e into development Apr 4, 2022
@germartinez germartinez deleted the fix-deployment branch April 4, 2022 13:21
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants