Specify and Use Contracts
To specify the contracts to use we only need to declare an alias and the contract address for it. Using this alias we allow for the execution of this contract using Python's dot notation alias.func()
.
This contract is specified to the agent using a dictionary:
This way when we want to use a contract within an agent we can easily access it using Python's dot notation, like the following example
It is mandatory to use the contracts inside the with
statement of the execute()
command so contracts are available and loaded.
The contracts must be deployed to be of use.
Also, you are responsible for handling what function to use and the parameters that it needs, as we only provide the abstraction of the execution.
Last updated