Open Adamantios opened 2 years ago
contract_method_call
, is there any benefit to using it in comparison to what we have now?enforce()
, I have created an issue for it #91 , and it will be worked on it in a future version.I wasn't aware of contract_method_call, is there any benefit to using it in comparison to what we have now?
No there is no additional benefit apart from uniformity across repos.
The reason why this merging is done on the round is to avoid sending large payloads. Apart from it being kinda ugly, do you see any other issues?
I see, sending large payloads is not a good idea. One reason to keep all the processing on the behaviour side would be for example to separate the concerns or to enhance readability, i.e., it is easier to read a behaviour and understand the skill. @DavidMinarsch would you have anything to add on this?
This review was performed for commit: e7f5eae0c430444ac43aa70ea64c63a5f219bca7
contract_method_call
in contracts. -> I also noticed that ourcontract_method_call
only acceptskwargs
. It does not acceptargs
. Maybe this is why it was not used?get_multiple_projects_info
andget_multiple_projects_minter
.enforce
e.g.,: https://github.com/valory-xyz/agent-academy-1/blob/3a7412b3bc10e4bf8ef6616df43771d25bc827f7/packages/valory/skills/fractionalize_deployment_abci/behaviours.py#L125 && https://github.com/valory-xyz/agent-academy-1/blob/3a7412b3bc10e4bf8ef6616df43771d25bc827f7/packages/valory/skills/fractionalize_deployment_abci/behaviours.py#L216 Rationale:enforce
should be used in lower levels, not inside behaviours. Also, exception handling in behaviours looks dirty and might mean that we can create methods at lower level modules to avoid that. Resolution: In many examples of the ElCollectooorr's code, theenforce
is used at the response's contents, instead of checking the state of the contract call's response. If we check that the response is successful instead, we do not need to check for the contents.