Skip to content

autonomy.deploy.chain

Utils to support on-chain contract interactions.

get_abi

def get_abi(path: Path) -> Dict

Read the ABI from the provided path.

ServiceRegistry Objects

class ServiceRegistry()

Class to represent on-chain service registry.

__init__

def __init__(chain_type: str = "staging", rpc_url: Optional[str] = None, service_contract_address: Optional[str] = None) -> None

Initialize object.

resolve_token_id

def resolve_token_id(token_id: int) -> Dict

Resolve token id using on-chain contracts.

get_agent_instances

def get_agent_instances(token_id: int) -> Tuple[int, List[str]]

Get the list of agent instances.

Arguments:

  • token_id: Token ID pointing to the on-chain service

Returns:

number of agent instances and the list of registered addressed

get_service_info

def get_service_info(token_id: int) -> ServiceInfo

Returns service info.

Arguments:

  • token_id: Token ID pointing to the on-chain service

Returns:

security deposit, multisig address, IPFS hash for config,

Back to top