-
Notifications
You must be signed in to change notification settings - Fork 38
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
Adding js/ts util method to verify JWT's generated by a scanner #212
Conversation
In terms of E2E testing are there any other ways to test without having to manually deploy a bot? |
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'm not seeing the Python SDK changes in the PR (maybe forgot to commit?)
E2E would imply that we are testing the whole stack (and therefore deploying a bot). we can definitely unit test these methods (just created a ticket to add unit tests for SDK methods #213) |
@@ -7,7 +7,7 @@ | |||
from .trace import Trace, TraceAction, TraceResult | |||
from .event_type import EventType | |||
from .network import Network | |||
from .utils import get_json_rpc_url, create_block_event, create_transaction_event, get_web3_provider, keccak256, get_transaction_receipt, get_alerts, fetch_Jwt_token, decode_Jwt_token | |||
from .utils import get_json_rpc_url, create_block_event, create_transaction_event, get_web3_provider, keccak256, get_transaction_receipt, get_alerts, fetch_Jwt, decode_Jwt |
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.
fetch_jwt, decode_jwt*
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.
Updated
Feature work
Testing
Manual/Local testing
In order to validate the verification locally I generated a JWT locally and called the verify method during the initialization of my bot running locally. B/c this bot isn't deployed to validate the happy path locally, during testing I found a bot and an scanner who were linked and hardcoded their addresses in the call to
areTheyLinked
to make sure the smart contract call was valid: