> For the complete documentation index, see [llms.txt](https://docs.symm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.symm.io/contract-documentation/symmio-options-v0.2.1/helper-contracts/symmiopartya.md).

# SymmioPartyA

Each SymmioPartyA instance is a sub-account that forwards calls to the Symmio diamond on behalf of a user. It is created and managed by the MultiAccount contract, supports ERC-1271 signature validation, and can hold and transfer trade NFTs.

### Constructor

Initializes a new SymmioPartyA contract with the MultiAccount as admin and a reference to the Symmio diamond.

```solidity
constructor(address multiAccountAddress_, address symmioAddress_) {
    _grantRole(DEFAULT_ADMIN_ROLE, multiAccountAddress_);
    symmioAddress = symmioAddress_;
    multiAccountAddress = multiAccountAddress_;
}
```

**Parameters:**

* `multiAccountAddress_`: The MultiAccount contract that manages this sub-account. Granted `DEFAULT_ADMIN_ROLE`.
* `symmioAddress_`: The address of the Symmio diamond contract to which calls are forwarded.

***

### setSymmioAddress

Updates the Symmio diamond address. Only callable by `DEFAULT_ADMIN_ROLE` (the MultiAccount contract).

```solidity
function setSymmioAddress(address symmioAddress_) external onlyRole(DEFAULT_ADMIN_ROLE);
```

**Parameters:**

* `symmioAddress_`: The new Symmio diamond address.

**Event:** `SetSymmioAddress(oldAddress, newAddress)`

***

### call()

Forwards a call from this sub-account to the Symmio diamond. Only callable by the MultiAccount contract (`onlyMultiAccount`).

```solidity
function call(bytes memory callData) external onlyMultiAccount returns (bool success, bytes memory resultData);
```

**Parameters:**

* `callData`: ABI-encoded function call to forward to the Symmio diamond.

**Returns:**

* `success`: Whether the call succeeded.
* `resultData`: The return data (or revert reason on failure).

***

### isValidSignature()

ERC-1271 signature verification. Delegates to the MultiAccount contract to check whether the signature is valid for this sub-account.

```solidity
function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4);
```

Returns `0x1626ba7e` (the ERC-1271 magic value) if valid, `0xffffffff` otherwise.

***

### transferTradeNFT()

Transfers a trade NFT held by this sub-account to another address. Only callable by the MultiAccount contract.

```solidity
function transferTradeNFT(address nftContract, address to, uint256 tokenId) external onlyMultiAccount;
```

**Parameters:**

* `nftContract`: The TradeNFT contract address.
* `to`: The recipient address.
* `tokenId`: The NFT token ID to transfer.

Uses `safeTransferFrom`. Reverts with `NFTTransferFailed` if the transfer fails.

**Event:** `NFTTransferred(to, tokenId)`

***

### onERC721Received()

Implements `IERC721Receiver` so this contract can receive trade NFTs via `safeTransferFrom`.

```solidity
function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4);
```

Returns the selector `IERC721Receiver.onERC721Received.selector`.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.symm.io/contract-documentation/symmio-options-v0.2.1/helper-contracts/symmiopartya.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
