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

integration: hop protocol #252

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions chat/display_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ def _widgetize_inner(command: str, params: str, depth: int = 0) -> str:
elif command == 'yield-protocol-borrow-close':
items = params.split(",")
lines.append(f"yield protocol borrow close action: {items[0]}")
elif command == 'hop-protocol-bridge':
items = params.split(",")
lines.append(f"hop protocol bridge action for amount: {items[0]}, token symbol: {items[1]}, from chain: {items[2]}, to chain: {items[3]}.")
else:
# assert 0, f'unrecognized command: {command}({params})'
lines.append(f"An unrecognized command: {command}({params})")
Expand Down
23 changes: 23 additions & 0 deletions knowledge_base/widgets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -698,3 +698,26 @@
- borrowToken
type: object
return_value_description: ""
- _name_: display_hop_protocol_bridge
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file seems to have extraneous formatting changes above, can you revert them so that the only change is the new widget

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, you would need to bump up the index version number for any new changes to take effect

description: use the hop protocol to bridge/deposit tokens from a supported chain to a different supported chain
parameters:
properties:
amount:
description: token amount
type: string
tokenSymbol:
description: token symbol
type: string
fromChain:
description: chain to bridge from
type: string
toChain:
description: chain to bridge to
type: string
required:
- amount
- tokenSymbol
- fromChain
- toChain
type: object
return_value_description: ""
2 changes: 1 addition & 1 deletion utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
WIDGET_INFO_TOKEN_LIMIT = 4000

# Widget Index
WIDGET_INDEX_NAME = "WidgetV20"
WIDGET_INDEX_NAME = "WidgetV21"

def get_widget_index_name():
if env.is_local():
Expand Down