-
Notifications
You must be signed in to change notification settings - Fork 320
feat: updates for caboodle demo #30
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
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
5ab882a
feat: add internal agent protocol
jrriehl 58e22a6
feat: compress protocol digests
jrriehl 05a1137
fix: example 06
Alejandro-Morales e1ddfd9
feat: add protocol id
jrriehl ea5e780
Merge branch 'agent-protocol' of ssh://github.com/fetchai/uAgents int…
jrriehl fd098f1
fix: update internal protocol digest and some names
jrriehl 5853c0a
chore: resolve conflict
jrriehl ff38ea3
fix: init internal protocol empty
jrriehl 2f8f7d6
feat: add cleaning demo
jrriehl a69aa61
chore: fix linting errors
jrriehl bfe9935
chore: uncomment empty digest assertion
jrriehl 283aa90
feat: interval protocol only contains agent registrations
jrriehl 8690ce9
feat: add interval messages to protocol
jrriehl 9a02d2f
fix: add messages to agent decorator
jrriehl fcc2ba3
chore: fix types for set union
jrriehl ce78d4e
chore: make private methods private
jrriehl d872e6a
feat: validate outgoing interval messages
jrriehl e003713
chore: resolve conflict
jrriehl 6e1dab7
chore: update demo and contract
jrriehl a01fe5d
fix: include interval messages in default agent context
jrriehl e357033
Merge branch 'agent-protocol' into cleaning-demo
jrriehl 2b34617
fix: message check and agent addresses
jrriehl 15ea924
feat: start tortoise integration
jrriehl 17e8648
chore: resolve conflict
jrriehl ca161fa
feat: add tortoise orm
jrriehl e94020b
chore: fix import
jrriehl 8a85706
chore: move tortoise to orm dependency group
jrriehl 3576815
feat: add on event handlers
jrriehl bb7e3a5
fix: startup name
jrriehl 95f80a9
feat: add user logic and fix db init
jrriehl c1bbc6f
Merge branch 'master' into cleaning-demo
jrriehl 4e2f306
feat: add datetimes
jrriehl 218d1a8
Merge branch 'cleaning-demo' of ssh://github.com/fetchai/uAgents into…
jrriehl 9c7c0ea
chore: pr revisions and resolve conflicts
jrriehl d31dadc
chore: resolve conflict
jrriehl 12e1c16
chore: resolve conflict
jrriehl 428a946
feat: initial connection working
jrriehl 6f9db66
chore: resolve conflict
jrriehl b5e18d7
fix: do not check for user address on query
jrriehl 00d985d
fix: envelope encoding
jrriehl d562a3c
fix: get first provider
jrriehl 228e23a
feat: enable signature verification (#31)
Alejandro-Morales 8c648dd
chore: revert to bech32 signature
jrriehl bc7f381
test: update tests
jrriehl 037d847
test: generate new wallet addresses
jrriehl 1c45c26
chore: revert endpoint and remove print statements
jrriehl 479ddd6
chore: fix linting errors
jrriehl 227faed
test: add asgi server tests (#34)
jrriehl ce58900
fix: pylint and test event loop
jrriehl 3045b77
fix: set message type to json str
jrriehl 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
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,46 @@ | ||
# pylint: disable=protected-access | ||
import unittest | ||
|
||
from nexus import Agent | ||
from nexus.setup import fund_agent_if_low | ||
|
||
|
||
class TestVerify(unittest.TestCase): | ||
def test_agent_registration(self): | ||
|
||
agent = Agent(name="alice") | ||
|
||
reg_fee = "500000000000000000atestfet" | ||
|
||
fund_agent_if_low(agent.wallet.address()) | ||
|
||
sequence = agent.get_registration_sequence() | ||
|
||
signature = agent._identity.sign_registration( | ||
agent._reg_contract.address, agent.get_registration_sequence() | ||
) | ||
|
||
msg = { | ||
"register": { | ||
"record": { | ||
"service": { | ||
"protocols": [], | ||
"endpoints": [{"url": agent._endpoint, "weight": 1}], | ||
} | ||
}, | ||
"signature": signature, | ||
"sequence": sequence, | ||
"agent_address": agent.address, | ||
} | ||
} | ||
|
||
transaction = agent._reg_contract.execute(msg, agent.wallet, funds=reg_fee) | ||
transaction.wait_to_complete() | ||
|
||
is_registered = agent.registration_status() | ||
|
||
self.assertEqual(is_registered, True, "Registration failed") | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.