AgentRegistryMetadata
AgentMetadata
struct AgentMetadata {
uint256 version;
string metadata;
uint256[] chainIds;
}
_agentMetadata
mapping(uint256 => struct AgentRegistryMetadata.AgentMetadata) _agentMetadata
_agentMetadataUniqueness
mapping(bytes32 => bool) _agentMetadataUniqueness
MetadataNotUnique
error MetadataNotUnique(bytes32 hash)
getAgent
function getAgent(uint256 agentId) public view returns (bool created, address owner, uint256 agentVersion, string metadata, uint256[] chainIds)
Gets agent metadata, version and chain Ids.
Name | Type | Description |
---|---|---|
agentId | uint256 | ERC1155 token id of the agent. |
Name | Type | Description |
---|---|---|
created | bool | if agent exists. |
owner | address | address. |
agentVersion | uint256 | of the agent. |
metadata | string | IPFS pointer. |
chainIds | uint256[] | the agent wants to run in. |
_agentUpdate
function _agentUpdate(uint256 agentId, string newMetadata, uint256[] newChainIds) internal virtual
logic for agent update.
checks metadata uniqueness and updates agent metadata and version.
Name | Type | Description |
---|---|---|
agentId | uint256 | ERC1155 token id of the agent to be created or updated. |
newMetadata | string | IPFS pointer to agent's metadata JSON. |
newChainIds | uint256[] | ordered list of chainIds where the agent wants to run. |
__gap
uint256[48] __gap