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

fix: adapter support added #5221

Merged
merged 7 commits into from
Dec 18, 2023
Merged

fix: adapter support added #5221

merged 7 commits into from
Dec 18, 2023

Conversation

prathmeshkhandelwal1
Copy link
Collaborator

Description

Added a feature to automate lockbox adapter process while dealing with xERC20 assets in xcall.

Type of change

  • New feature (non-breaking change which adds functionality)

High-level change(s) description - from the user's perspective

Related Issue(s)

Fixes: #5154

Related pull request(s)

const isXERC20 = await xerc20Registry.functions.isXERC20(tokenAddress);
if (isXERC20) {
const lockbox = await xerc20Registry.functions.getLockbox(tokenAddress);
if (lockbox !== "0x0000000000000000000000000000000000000000") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can use constants.AddressZero

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

remved this

@@ -228,7 +228,17 @@ export class SdkBase extends SdkShared {
});
}

const connextContractAddress = (await this.getConnext(origin, options)).address;
const isValidAsset = await this.hasLockbox(origin, asset, options);
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's name this something more specfic, like isValidLockboxAsset

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed this whole logic

just-a-node
just-a-node previously approved these changes Dec 1, 2023
@prathmeshkhandelwal1 prathmeshkhandelwal1 merged commit 6c34a21 into main Dec 18, 2023
22 checks passed
@prathmeshkhandelwal1 prathmeshkhandelwal1 deleted the adapter-xcall branch December 18, 2023 13:44
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.

SDK changes to support adapter
3 participants