-
Notifications
You must be signed in to change notification settings - Fork 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
Add configurable Mech request price parameter and migrate mech contract functionality #146
Conversation
…_configurable_request_price
…tract_functionality
@@ -310,6 +327,7 @@ def async_act(self) -> Generator: | |||
) |
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 logging should not be present or at least not at an info
level. Moreover, serialized_data
is a generator.
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.
Please make a concrete suggestion how to fix this.
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.
Logging a generator is not useful, there's no content to print if it's not consumed.
The suggestion is to remove this unnecessary log and many more that have been added for debugging purposes to the mech interact skill.
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.
Opened #153.
packages/valory/skills/mech_interact_abci/behaviours/response.py
Outdated
Show resolved
Hide resolved
None, | ||
None, | ||
GNOSIS_CHAIN_ID, | ||
None, | ||
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.
This won't trigger the none_event
.
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 was the case in the previous state of the repository (GNOSIS_CHAIN_ID was also present). Please open an issue to fix it in another PR.
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.
Additionally, no NONE event is specified in the FSM app:
https://github.com/valory-xyz/IEKit/blob/main/packages/valory/skills/mech_interact_abci/rounds.py#L51-L56
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.
Added issue #155. This has to be addressed on a different PR, as this one is already quite complex.
@@ -65,6 +65,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: | |||
self.mech_contract_address: str = self._ensure( | |||
"mech_contract_address", kwargs, str | |||
) | |||
self.request_price: Optional[int] = kwargs.get("request_price", 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.
Why not self._ensure("request_price", ...
?
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.
Maybe this is used in more than one skill and ensure pops.
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.
Can you point out which skill?
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.
That was a guess, not an actual assertion.
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.
It was decided that request_price be an optional parameter. Therefore, cannot use _ensure.
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.
cc @0xArdi
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 is an optional param.
Proposed changes
Adds parameter 'request_price'
Migrate all contract functionality from mech contract on Trader to IEKit (deleted contract in Use mech_interact_abci trader#238). Addressess issue Ensure all mech contract functionality is migrated to this repository #150.
Fixes
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce? (A breaking change is a fix or feature that would cause existing functionality and APIs to not work as expected.)
Put an
x
in the box that appliesChecklist
Put an
x
in the boxes that apply.main
branch (left side). Also you should start your branch off ourmain
.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...