# XVSBridgeAdmin

## XVSBridgeAdmin

The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.

## Solidity API

#### functionRegistry

A mapping keeps track of function signature associated with function name string.

```solidity
mapping(bytes4 => string) functionRegistry
```

***

#### fallback

Invoked when called function does not exist in the contract.

```solidity
fallback(bytes data) external returns (bytes)
```

**Return Values**

| Name | Type  | Description                 |
| ---- | ----- | --------------------------- |
| \[0] | bytes | Response of low level call. |

**⛔️ Access Requirements**

* Controlled by AccessControlManager.

***

#### setTrustedRemoteAddress

Sets trusted remote on particular chain.

```solidity
function setTrustedRemoteAddress(uint16 remoteChainId_, bytes remoteAddress_) external
```

**Parameters**

| Name            | Type   | Description                        |
| --------------- | ------ | ---------------------------------- |
| remoteChainId\_ | uint16 | Chain Id of the destination chain. |
| remoteAddress\_ | bytes  | Address of the destination bridge. |

**⛔️ Access Requirements**

* Controlled by AccessControlManager.

**❌ Errors**

* ZeroAddressNotAllowed is thrown when remoteAddress\_ contract address is zero.

***

#### upsertSignature

A setter for the registry of functions that are allowed to be executed from proposals.

```solidity
function upsertSignature(string[] signatures_, bool[] active_) external
```

**Parameters**

| Name         | Type      | Description                                 |
| ------------ | --------- | ------------------------------------------- |
| signatures\_ | string\[] | Function signature to be added or removed.  |
| active\_     | bool\[]   | bool value, should be true to add function. |

**📅 Events**

* Emits FunctionRegistryChanged if bool value of function changes.

**⛔️ Access Requirements**

* Only owner.

***

#### transferBridgeOwnership

This function transfers the ownership of the bridge from this contract to new owner.

```solidity
function transferBridgeOwnership(address newOwner_) external
```

**Parameters**

| Name       | Type    | Description                  |
| ---------- | ------- | ---------------------------- |
| newOwner\_ | address | New owner of the XVS Bridge. |

**⛔️ Access Requirements**

* Controlled by AccessControlManager.

***

#### isTrustedRemote

Returns true if remote address is trustedRemote corresponds to chainId\_.

```solidity
function isTrustedRemote(uint16 remoteChainId_, bytes remoteAddress_) external returns (bool)
```

**Parameters**

| Name            | Type   | Description                        |
| --------------- | ------ | ---------------------------------- |
| remoteChainId\_ | uint16 | Chain Id of the destination chain. |
| remoteAddress\_ | bytes  | Address of the destination bridge. |

**Return Values**

| Name | Type | Description                                                 |
| ---- | ---- | ----------------------------------------------------------- |
| \[0] | bool | Bool indicating whether the remote chain is trusted or not. |

**❌ Errors**

* ZeroAddressNotAllowed is thrown when remoteAddress\_ contract address is zero.

***

#### renounceOwnership

Empty implementation of renounce ownership to avoid any mishappening.

```solidity
function renounceOwnership() public
```

***


---

# 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-v4.venus.io/technical-reference/reference-xvs-bridge/xvsbridgeadmin.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.
