> For the complete documentation index, see [llms.txt](https://docs.asphodel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.asphodel.io/kamigotchi/tech/contracts/live-addresses.md).

# 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';
};
```
