autonomy.cli.helpers.chain
On-chain interaction helpers.
MintHelper Objects
class MintHelper(OnChainHelper)
Mint helper.
__init__
def __init__(chain_type: ChainType,
key: Optional[Path] = None,
password: Optional[str] = None,
hwi: bool = False,
update_token: Optional[int] = None,
timeout: Optional[float] = None,
retries: Optional[int] = None,
sleep: Optional[float] = None,
subgraph: Optional[str] = None,
dry_run: bool = False) -> None
Initialize object.
load_package_configuration
def load_package_configuration(package_path: Path,
package_type: PackageType) -> "MintHelper"
Load package configuration.
load_metadata
def load_metadata() -> "MintHelper"
Load metadata when updating a mint.
verify_nft
def verify_nft(nft: Optional[NFTHashOrPath] = None) -> "MintHelper"
Verify NFT image.
fetch_component_dependencies
def fetch_component_dependencies() -> "MintHelper"
Verify component dependencies.
verify_service_dependencies
def verify_service_dependencies(agent_id: int) -> "MintHelper"
Verify component dependencies.
publish_metadata
def publish_metadata() -> "MintHelper"
Publish metadata.
mint_component
def mint_component(owner: Optional[str] = None,
component_type: UnitType = UnitType.COMPONENT) -> None
Mint component.
mint_agent
def mint_agent(owner: Optional[str] = None) -> None
Mint agent.
mint_service
def mint_service(number_of_slots: int,
cost_of_bond: int,
threshold: Optional[int] = None,
token: Optional[str] = None,
owner: Optional[str] = None) -> None
Mint service
update_component
def update_component(component_type: UnitType = UnitType.COMPONENT) -> None
Update component.
update_agent
def update_agent() -> None
Update agent.
update_service
def update_service(number_of_slots: int,
cost_of_bond: int,
threshold: Optional[int] = None,
token: Optional[str] = None) -> None
Update service
ServiceHelper Objects
class ServiceHelper(OnChainHelper)
Service helper.
__init__
def __init__(service_id: int,
chain_type: ChainType,
key: Optional[Path] = None,
password: Optional[str] = None,
hwi: bool = False,
timeout: Optional[float] = None,
retries: Optional[int] = None,
sleep: Optional[float] = None,
dry_run: bool = False) -> None
Initialize object.
check_is_service_token_secured
def check_is_service_token_secured(
token: Optional[str] = None) -> "ServiceHelper"
Check if service
approve_erc20_usage
def approve_erc20_usage(amount: int, spender: str) -> "ServiceHelper"
Approve ERC20 usage.
activate_service
def activate_service() -> None
Activate on-chain service
register_instance
def register_instance(instances: List[str], agent_ids: List[int]) -> None
Register agents instances on an activated service
deploy_service
def deploy_service(reuse_multisig: bool = False,
use_recovery_module: bool = False,
fallback_handler: Optional[str] = None) -> None
Deploy a service with registration activated
terminate_service
def terminate_service() -> None
Terminate a service
unbond_service
def unbond_service() -> None
Unbond a service
recover_multisig
def recover_multisig() -> None
Recover the service multisig
print_service_info
def print_service_info(service_id: int, chain_type: ChainType) -> None
Print service information