Method Signature
Description
Updates the list of protocols that an agent can use for yield optimization. This allows you to add or remove protocols after the agent has been activated.Parameters
Smart account wallet address.
Array of protocol names to use. Must include at least one protocol.Example:
["aave", "compound", "moonwell"]Return Value
ReturnsPromise<void> - resolves when the protocols are successfully updated.
Example
Error Handling
Common Errors
| Error | Cause | Solution |
|---|---|---|
ValidationError: wallet address is required | Missing wallet parameter | Provide a valid wallet address |
ValidationError: At least one protocol must be provided | Empty protocols array | Provide at least one protocol |
ValidationError: wallet address must be a valid Ethereum address | Invalid address format | Ensure address starts with 0x and has 40 hex characters |