# Live addresses

## Constant

<table data-header-hidden data-full-width="false"><thead><tr><th width="235">Contract</th><th>Address</th></tr></thead><tbody><tr><td>World</td><td>0x89090F774BeC95420f6359003149f51fec207133</td></tr></tbody></table>

## Dynamic

Component and system addresses can change when upgrading/deploying. These addresses are instead stored in World, and reference via its id.

```typescript
const getCompAddr = async (strID: string): Promise<string> => {
  const world = new ethers.Contract(worldAddr, WorldABI, provider);
  const systemRegistry = await world.components();

  const id = ethers.utils.solidityKeccak256(['string'], [strID]);
  return await getAddrByID(systemRegistry, id);
};

const getSystemAddr = async (strID: string): Promise<string> => {
  const world = new ethers.Contract(worldAddr, WorldABI, provider);
  const systemRegistry = await world.systems();

  const id = ethers.utils.solidityKeccak256(['string'], [strID]);
  return await getAddrByID(systemRegistry, id);
};

const getAddrByID = async (
  compsAddr: string,
  id: BigNumberish
): Promise<string> => {
  const comp = new ethers.Contract(compsAddr, UintCompABI, provider);
  const values = await comp.getEntitiesWithValue(id);
  return values.length > 0 ? values[0].toHexString() : '0x0000000000000000000000000000000000000000';
};
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kamigotchi.io/tech/contracts/live-addresses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
