-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
refactor: daemon updates [SBK-173] #17
Conversation
SBK-173 "refactor: daemon updates" (ApeWorX/ApePay #17)
ApeWorX/ApePay #17 by fubuloubu on GitHub via LinearSync |
8782d82
to
1b8dd84
Compare
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.
empty raise statements are not valid when there are no exceptions on the stack.
apepay/__init__.py
Outdated
# return self.chain_manager.contracts.instance_at(self.address) | ||
try: | ||
return self.chain_manager.contracts.instance_at(self.address) | ||
except Exception: |
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.
what types of exceptions do you expect here? wondering if we could mitigate anything upstream?
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.
Could reduce to the "contract not found" error, only need to fallback on a local network or if we don't have an explorer (although it still won't work unless we somehow bundle the manifest)
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 will make it a little nicer: https://github.com/ApeWorX/ape/pull/1551/files
apepay/__init__.py
Outdated
return self.project_manager.StreamManager.at(self.address) | ||
# return self.chain_manager.contracts.instance_at(self.address) | ||
try: | ||
return self.chain_manager.contracts.instance_at(self.address) |
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.
eventually we will want to include the contracts and reference the project via manifest, right?
ac1f84d
to
806c17f
Compare
@@ -51,16 +52,21 @@ def validate(self, creator, token, amount_per_second, reason) -> bool: | |||
|
|||
class StreamManager(BaseInterfaceModel): | |||
address: AddressType | |||
contract_type: Optional[ContractType] = None |
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 want to somehow bundle the manifest/contract type with the package so that we always have this as a backup
806c17f
to
8b012bf
Compare
Got it working on Sepolia