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

Readme files for account, paymaster and bundler package #229

Merged
merged 5 commits into from
Jul 12, 2023

Conversation

talhamalik883
Copy link
Contributor

This PR includes Readme files for account, paymaster and bundler package

@talhamalik883 talhamalik883 changed the base branch from sdk_modularity to m_development_sdk_v3 July 11, 2023 18:26
@talhamalik883 talhamalik883 requested a review from Rahat-ch July 11, 2023 18:28
import { IPaymaster, BiconomyPaymaster } from '@biconomy/paymaster'

const paymaster: IPaymaster = new BiconomyPaymaster({
paymasterUrl: '' // you can get this value from biconomy dashboard.

Choose a reason for hiding this comment

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

nit: we should add link to the biconomy dashboard whenever we mention to get a value from it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved

Copy link

@Rahat-ch Rahat-ch 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

packages/account/Readme.md Outdated Show resolved Hide resolved
packages/account/Readme.md Outdated Show resolved Hide resolved
packages/account/Readme.md Show resolved Hide resolved
packages/paymaster/Readme.md Outdated Show resolved Hide resolved
packages/paymaster/Readme.md Outdated Show resolved Hide resolved
packages/paymaster/Readme.md Outdated Show resolved Hide resolved
@@ -0,0 +1,133 @@
# Biconomy SDK
The Biconomy Software Development Kit (SDK) build purely on atop of ERC4337 solution, presents a comprehensive range of solutions, from user onboarding to sustained engagement, specifically designed for decentralised applications (dApps). This SDK functions in a non-custodial fashion, provides a unified solution that enhances the user experience within your dApp.
Copy link
Contributor

Choose a reason for hiding this comment

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

on * the top of
ERC4337 solution can have a better word.

signer: wallet.getSigner(),
chainId: ChainId.POLYGON_MAINNET,
rpcUrl: '',
paymaster: paymaster, //you can skip paymaster instance if not interested in transaction sposoring
Copy link
Contributor

Choose a reason for hiding this comment

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

for how to create paymaster instance, refer to paymaster docs.

one can also create their custom paymaster as long as it implements IPaymaster interface. this should be mentioned here/somewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have already added the snippet to create a Paymaster instance before this step

// building userOperation
const builtUserOp = await biconomySmartAccount.buildUserOp([transaction])

const biconomyPaymaster = biconomySmartAccount.paymaster as IHybridPaymaster<SponsorUserOperationDto>
Copy link
Contributor

Choose a reason for hiding this comment

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

this part is specific to paymaster and biconomy paymaster. this should not be here but instead in paymaster readme.


**getPaymasterFeeQuotesOrData**

This function is used to fetch quote information or data base on provider userOperation and paymasterServiceData.
Copy link
Contributor

Choose a reason for hiding this comment

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

*based on


**buildTokenApprovalTransaction**

This function is specifically used for token paymaster sponsorship. The primary purpose of this function is to create an approve transaction that gets batched with the rest of your transactions. This way, you will be paying the paymaster in ERC20 tokens, which will result in the paymaster paying on your behalf in native tokens.
Copy link
Contributor

Choose a reason for hiding this comment

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

*token approval transaction
explain here spender will be paymaster

Copy link
Contributor

Choose a reason for hiding this comment

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

"which will result in the paymaster paying on your behalf in native tokens" this is not needed and is rather confusing


**getPaymasterAndData**

This function accepts a **`Partial<UserOperation>`** object that includes all properties of **`userOp`** except for the **`signature`** field. It returns **`paymasterAndData`** as part of the **`PaymasterAndDataResponse`**. The **`paymasterAndData`** string is signed by the paymaster's verifier signer, which will eventually result in the payment of your transaction fee by the paymaster.
Copy link
Contributor

Choose a reason for hiding this comment

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

correct this as well.

The paymasterAndData string is signed by the paymaster's verifier signer. this is misleading

SponsorUserOperationDto,
} from '@biconomy/paymaster'

const bundler: IBundler = new Bundler({
Copy link
Contributor

Choose a reason for hiding this comment

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

this readme should only showcase how to create paymaster instance and different methods available. and minimal info on how to use it with userop. actually just say that once you get paymasterAndData you can update your userop.
All specific about attributes passed in case of hybrid paymaster can be added separately here.

Copy link
Contributor

@livingrockrises livingrockrises left a comment

Choose a reason for hiding this comment

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

gave some comments. do pass your whole files for grammar checker and update accordingly with it's suggestions and checks. I will update these more tomorrow.

@livingrockrises
Copy link
Contributor

we also need updated Readme for common and core-types packages.

@livingrockrises livingrockrises merged commit c304a43 into m_development_sdk_v3 Jul 12, 2023
@livingrockrises livingrockrises deleted the Readme branch July 17, 2023 15:15
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