-
Notifications
You must be signed in to change notification settings - Fork 3
ACP Developer Experience Improvements #34
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
import time | ||
|
||
from virtuals_acp.client import VirtualsACP | ||
from virtuals_acp.configs import BASE_MAINNET_CONFIG | ||
from virtuals_acp.job import ACPJob | ||
from virtuals_acp.models import ACPAgentSort, ACPJobPhase | ||
from virtuals_acp.env import EnvSettings | ||
|
@@ -47,8 +48,11 @@ def on_evaluate(job: ACPJob): | |
agent_wallet_address=env.BUYER_AGENT_WALLET_ADDRESS, | ||
on_new_task=on_new_task, | ||
on_evaluate=on_evaluate, | ||
entity_id=env.BUYER_ENTITY_ID | ||
entity_id=env.BUYER_ENTITY_ID, | ||
config=BASE_MAINNET_CONFIG | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove the config param |
||
) | ||
|
||
print(f"ACP client: {acp.agent_address}") | ||
|
||
# Browse available agents based on a keyword and cluster name | ||
relevant_agents = acp.browse_agents( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
import json | ||
|
||
from virtuals_acp import VirtualsACP, ACPJob, ACPJobPhase | ||
from virtuals_acp.configs import BASE_MAINNET_CONFIG | ||
from virtuals_acp.env import EnvSettings | ||
|
||
from dotenv import load_dotenv | ||
|
@@ -40,8 +41,11 @@ def on_new_task(job: ACPJob): | |
wallet_private_key=env.WHITELISTED_WALLET_PRIVATE_KEY, | ||
agent_wallet_address=env.SELLER_AGENT_WALLET_ADDRESS, | ||
on_new_task=on_new_task, | ||
entity_id=env.SELLER_ENTITY_ID | ||
entity_id=env.SELLER_ENTITY_ID, | ||
config=BASE_MAINNET_CONFIG | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove the config param |
||
) | ||
|
||
print(f"ACP client: {acp_client.agent_address}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove this print statement |
||
|
||
# Keep the script running to listen for new tasks | ||
while True: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,33 @@ | |
) | ||
from .exceptions import ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tihnk these are a bit overkill especially if not use - would leave it to individual devs to customise their own error messages so we left it quite generic |
||
ACPError, | ||
ACPConnectionError, | ||
ACPRPCConnectionError, | ||
ACPSocketConnectionError, | ||
ACPAuthenticationError, | ||
ACPInvalidPrivateKeyError, | ||
ACPInvalidAddressError, | ||
ACPApiError, | ||
ACPApiRequestError, | ||
ACPAgentNotFoundError, | ||
ACPJobNotFoundError, | ||
ACPMemoNotFoundError, | ||
ACPContractError, | ||
ACPTransactionError, | ||
ACPTransactionFailedError, | ||
ACPInsufficientFundsError, | ||
ACPGasEstimationError, | ||
ACPContractLogParsingError, | ||
ACPTransactionSigningError, | ||
ACPJobError, | ||
ACPJobCreationError, | ||
ACPJobStateError, | ||
ACPPaymentError, | ||
ACPJobBudgetError, | ||
ACPValidationError, | ||
ACPMemoValidationError, | ||
ACPSchemaValidationError, | ||
ACPParameterValidationError, | ||
TransactionFailedError | ||
) | ||
from .client import VirtualsACP | ||
|
@@ -35,8 +60,33 @@ | |
"BASE_MAINNET_CONFIG", | ||
"DEFAULT_CONFIG", | ||
"ACPError", | ||
"ACPConnectionError", | ||
"ACPRPCConnectionError", | ||
"ACPSocketConnectionError", | ||
"ACPAuthenticationError", | ||
"ACPInvalidPrivateKeyError", | ||
"ACPInvalidAddressError", | ||
"ACPApiError", | ||
"ACPApiRequestError", | ||
"ACPAgentNotFoundError", | ||
"ACPJobNotFoundError", | ||
"ACPMemoNotFoundError", | ||
"ACPContractError", | ||
"ACPTransactionError", | ||
"ACPTransactionFailedError", | ||
"ACPInsufficientFundsError", | ||
"ACPGasEstimationError", | ||
"ACPContractLogParsingError", | ||
"ACPTransactionSigningError", | ||
"ACPJobError", | ||
"ACPJobCreationError", | ||
"ACPJobStateError", | ||
"ACPPaymentError", | ||
"ACPJobBudgetError", | ||
"ACPValidationError", | ||
"ACPMemoValidationError", | ||
"ACPSchemaValidationError", | ||
"ACPParameterValidationError", | ||
"TransactionFailedError", | ||
"ACP_ABI", | ||
"ERC20_ABI", | ||
|
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 you remove the config param? we removed these on purpose because the default behaviour would be mainnet-only moving forward (except for exceptional scenarios)