-
Notifications
You must be signed in to change notification settings - Fork 1
Extension now interacts with AgentCommunication contract #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
66d43d2
Initial working version
gabrielfior 9aa3c92
Small python improvements
gabrielfior 24e24d1
Final touches
gabrielfior 4d0d445
Missing files
gabrielfior 81d8d92
Commented out Foundry-specific config
gabrielfior a36d21e
Removed dead code
gabrielfior 54023f3
Update python_web3_wallet/frontend/src/PythonWeb3Wallet.tsx
gabrielfior File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Abi from AgentCommunicationContract - see https://gnosisscan.io/address/0xd422e0059ed819e8d792af936da206878188e34f#code | ||
export const abi = [ | ||
{ | ||
"type": "function", | ||
"name": "sendMessage", | ||
"inputs": [ | ||
{ | ||
"name": "agentAddress", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "message", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "payable" | ||
}, | ||
] as const |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const AGENT_COMMUNICATION_CONTRACT = '0xd422e0059ed819e8d792af936da206878188e34f'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding to our discussion on Slack on having multiple components in the same package -> see https://discuss.streamlit.io/t/creating-multiple-custom-components-in-the-same-python-package/10906/7
tl;dr some work would be needed to maintain multiple components in parallel. Since this is still in the testing phase and we are validating this ideas internally, I decided to keep just one custom component for simplicity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in that case, this repo and pypi package shouldn't be called
python-web3-wallet-streamlit
.More something in terms of
agent-communication-streamlit
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you could duplicate this repository with the new name, and merge this PR there. That way we have 2 repositories:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal of this repository is to simply house a Streamlit wallet component allowing users to send messages to agents.
Previously, sending messages involved
sending classic xDai transactions.
. This logic changed after our internal discussion with Martin and now involves executing a transaction on a smart contract. Hence, I refactored the logic and now pressing the button triggers the aforementioned transaction. Per the above, I don't think it's necessary to create a new repo/create a new component, since the old logic has been deprecated in favor of the new one.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought you got my reasoning over Slack -- on the one hand, we talk about how awesome it would be to have some tools/frameworks to drive people to Gnosis (AI), on the other, when we have a handy functional component that could be interesting for machine learning people who mostly work in Python and Streamlit, it's going to be deleted because keeping it involves a few boring clicks around Github and PyPi.
However, in the end, it's all your code in this repository, so if you want to get rid of it, I won't block it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires a bit more planning - it's not "build it and they will come", this involves DevRel, talking to the community to see what they want to build, we prepare something, give talks, etc etc - simply having 1...N components is not going to move the needle.
Happy to brainstorm on this better, but closing this as per above.